Google-sheets – INDEX + MATCH to return the greatest of all matching values

formulasgoogle sheetsgoogle-sheets-datesgoogle-sheets-queryvlookup

I'm looking for the most recent date corresponding to a particular name. Dates are not necessarily ordered. I can't sort the target, I need it to work in any order.

Example: When was [Roberto]'s most recent haircut?
input:  "Roberto" 
desired output: "4/6"

Name     Date of haircut
Roberto  1/21
Xi       1/22
Jess     1/31
Roberto  4/6
Barbara  3/1
Mary     2/2
Roberto  3/10

Best Answer

=TEXT(VLOOKUP(A2, QUERY(A:B, "order by A, B desc"), 2, 0), "m/d")

0