Find a value in cells

N

nicgendron

Hi, all,

I have something like this :

a 1
b 4
c 5
d 3

I'm doing a max function in the number column and it returns me '5'

But, after that, I want to know the letter which corresponds to the max
number

How can I do that?

Thanks

Nic
 
B

Barb Reinhardt

Let's say that your data is in A1:B4

To return "c" as the value that matches the max value, use this

=INDIRECT("A"&MATCH(MAX(B1:B4),B1:B4))

I'm sure there's a way to dynamically determine the "A" value, but this gets
you what you need..
 
D

Dave Peterson

One way:
=index(a1:a4,match(max(b1:b4),b1:b4,0))

Adjust your ranges to match.
 
Top