A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
Put this in E2 and drag down.
=INDEX($B$1:$C$1,MATCH(MAX(B2:C2),B2:C2,0))
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I would like to reformat/ query a table like the one below to select not only the maximum value from each row, but also the column name it is associated with. I'm not very familiar with SQL or macros or scripting. Any advice for something relatively easy? I'd pretty much like the resulting table to look like the one below if possible.
Thanks,
Aly
| RecordID (Column A) | Class1 (Column B) | Class2 (Column C) | max value per row | ?CLASS (column name??) |
|---|---|---|---|---|
| 1 | 50 | 100 | [=max(B2:C2)] = 100 | = Class2 |
| 2 | 200 | 50 | [=max(B3:C3)] = 200 | = Class1 |
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Hi,
Put this in E2 and drag down.
=INDEX($B$1:$C$1,MATCH(MAX(B2:C2),B2:C2,0))
Awesome. Worked perfectly.
Thanks!