Reputation: 307
How do I return the value in a column being used to label the rows of a table? For example, given the table below I want to find MAX(A:A) and return "Three" instead of the value 1.
|A B C D
--------|---------------------------------
One |0.2 0.2 0.5 0.4
Two |0.1 0.1 0.6 0.1
Three |1.0 0.3 0.7 0.2
Four |0.5 0.4 0.5 0.3
Assume if two values are the same then returning either is acceptable.
Upvotes: 20
Views: 52540
Reputation: 23
use the OFFSET and MATCH functions with MAX
OFFSET(A1,MATCH(MAX(A:A),A:A,0),0)
MATCH returns the position of a lookup value in the lookup array.
Upvotes: 2
Reputation: 27478
Assuming data in rows 1 to 4, put this in B5 to get the answer for column B:
=INDEX(A1:A4,MATCH(MAX(B1:B4),B1:B4,0))
Upvotes: 26