Find Largest and Return Column Name

T

Tom321

I am comparing 3 columns and trying to find the maximum value of the columns.
But instead of just displaying the maximum value I would like it to show
which column the value is from.

OBS_ID CLASS1 CLASS2 CLASS3
A 2 5 10
B 12 10 4
C 5 1 15
D 2 6 12
E 1 23 9


So in this case, when the formula is run it will return "CLASS3" for Row A
and "CLASS1" for Row B and so on..

Thanks for you help
 
K

kraljb

Assuming that your Column Titles are in Row1 and that Data begins Row2
=INDEX(A1:D1,0,MATCH(MAX(A2:D2),A2:D2,0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top