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
With data in columns A and B use the Array Formula:
=MAX(IF(A1:A6="x",B1:B6))
Same for "y" and "z"
Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key.

Notice the braces in the Formula Bar
EDIT#1:
To generate the formulas automatically, first copy column A to column C.
Then use the Remove Duplicate feature in the Data tab:

Then enter the Array Formula in cell D1:
=MAX(IF(A$1:A$14=C1,B$1:B$14))
and copy down:

The formula is only entered once and then copied down!