Find values across a row and return a text value from the same column

R

ryan.reynolds374

I need to find the largest, second largest, etc numbers across a set in a row then have the formula return the columns header (different row, same column).

I know the index function may be best for this, but I am lost getting the function to operate properly here. Thanks for any help you can provide.

-Ryan
 
Z

zvkmpw

I need to find the largest, second largest, etc numbers across a set in a
row then have the formula return the columns header (different row, same
column).

I put header values in A1:J1, and numbers in A2:J14.

I put formulas to show the headers for the largest number of each row in K2:K14; second largest, L2:L14, etc.

The formulas started with this in K2:
=INDEX($A$1:$J$1,1,MATCH(LARGE($A2:$J2,COLUMN()-10),$A2:$J2,0))
Then copy the formula to all of K2:T14.

Modify to conform wiuth your data layout.

Hope this helps getting started.
 
Z

zvkmpw

I need to find the largest, second largest, etc numbers across a set in a
row then have the formula return the columns header (different row, same
column).

I put header values in A1:J1, and numbers in A2:J14.

I put formulas to show the headers for the largest number of each row in K2:K14; second largest, L2:L14, etc.

The formulas started with this in K2:
=INDEX($A$1:$J$1,1,MATCH(LARGE($A2:$J2,COLUMN()-10),$A2:$J2,0))
Then copy the formula to all of K2:T14.

Modify to conform wiuth your data layout.

If there can be a tie in the numbers, the first header gets repeated. Hopefully, this is ok.

Hope this helps getting started.
 
R

Ron Rosenfeld

=INDEX($A$1:$J$1,1,MATCH(LARGE($A2:$J2,COLUMN()-10),$A2:$J2,0))

Not tested but I think you would get the same result, and not have it be dependent on the intial column, by using:

COLUMNS($A:A)
 

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