Forum Discussion
Bartosz SzymaĆski
Aug 17, 2017Brass Contributor
Function that takes the max value and shows the name of the column
Hello everybody, I've got a problem with developing a function that will, choose the bigest value from the rows fields and as the outcome will show the name of the column in F column. Maybe any of you have any idea how to solve that. Best regards. The example is attached.
When something like
=INDEX($B$1:$E$1,1,MATCH(MAX(B2:E2),B2:E2,0))
in F2 (for the second row), copy down then. It returns #N/A if no one number in the row, you may use IFERROR to correct
- Bartosz SzymaĆskiBrass ContributorExactly, thats what I need :)
When something like
=INDEX($B$1:$E$1,1,MATCH(MAX(B2:E2),B2:E2,0))
in F2 (for the second row), copy down then. It returns #N/A if no one number in the row, you may use IFERROR to correct
- Bartosz SzymaĆskiBrass Contributorobviously it worked, thanks Sergei :)
Hi Bartosz,
Do you mean the max value in the row for columns from B to E and return in F (same row) the name from B1 to E1?