SOLVED

Function that takes the max value and shows the name of the column

Brass Contributor

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.

4 Replies

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?

Exactly, thats what I need :)
best response confirmed by Bartosz Szymański (Brass Contributor)
Solution

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

 

obviously it worked, thanks Sergei :)
1 best response

Accepted Solutions
best response confirmed by Bartosz Szymański (Brass Contributor)
Solution

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

 

View solution in original post