Return column header as solution to lookup

T

Tessa

I want to search for the minimum value in each row and then return the column
header for the answer. For example:

FROM zip city QS SF PR

55001 AFTON 17.5 29.08 10.5 "answer"

Where the answer would be PR
I need this formula to copy down 178 rows as well. I have tried lookup,
hlookup and a few others, but cant seem to get it to work. Thanks in advance.
 
R

Ron Coderre

If headings QS, SF, and PR are in cells D1:F1
with their data below them...

This formula finds the heading for the lowest
value in D5:F5
=INDEX($D$1:$F$1,MATCH(MIN(D5:F5),D5:F5,0))

Is that something you can work with?

Regards,

Ron Coderre
Microsoft MVP (Excel)
 
B

Bob Umlas

If the header is in row 1, put this in G2:
=INDEX($1:$1,MATCH(MIN(A2:F2),A2:F2,0))
and fill down
Bob Umlas
Excel MVP
 
T

Tessa

This worked perfectly! THANK YOU!!

Ron Coderre said:
If headings QS, SF, and PR are in cells D1:F1
with their data below them...

This formula finds the heading for the lowest
value in D5:F5
=INDEX($D$1:$F$1,MATCH(MIN(D5:F5),D5:F5,0))

Is that something you can work with?

Regards,

Ron Coderre
Microsoft MVP (Excel)
 

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