I have an Excel spreadsheet of the form:
A,B X,1 X,5 Y,4 Y,11 X,7 Z,1
I would like to get the maximum value of column B for each distinct v
Try below. Note I moved your desired output table to Columns D and E. You will not need to hard-code any values into formulas.
Data
D E Y 11 X 7 Z 1
Formulas
E2 Formula: ={MAX(--($D1=A1:A6)*B1:B6)} E3 Formula: ={MAX(--($D2=A2:A7)*B2:B7)} E4 Formula: ={MAX(--($D3=A3:A8)*B3:B8)}