In Numbers, is there a way to get the row instead of the value when using a MAX or MIN Function?
For example, let's take this sheet:
bread 10
cheese 20
meat 35
What I am trying to do is to show the most expensive food by comparing all price values, getting the row number of the MAX value and then print the respective food on that line.
Best Answer
Using
INDEX(MATCH)
this can be easily accomplished.Formulas
This formula returns the food label:
=INDEX(Foods, MATCH(MIN(Cost),Cost))
This formula returns the Row number:
=ROW(INDEX(Foods,MATCH(MIN(Cost),Cost)))
Replacing MIN with MAX returns the row with the Max result.
Further information on these functions can be found in the Functions reference.