Ah, yes
try
in AQ6:AQ14 put the row numbers 1...9 (without "row")
in V5
=SUMPRODUCT(($AS$6:$BC$14=A5)*$AQ$6:$AQ$14)
This is coming up with some odd answers like row 10 for 54 as 54 is repeated in the grid.
Or use this
in V5
=INDEX($AQ$6:$AQ$14,MAX(IF($AS$6:$BC$14=A5,ROW($AQ$6:$AQ$14)-ROW($AQ$6)+1)))
Array formula, use Ctrl-Shift-Enter
and copy to the other cells.
This ignores repeats but only finds the first occurrence in the grid.