Forum Discussion

Bartosz SzymaƄski's avatar
Bartosz SzymaƄski
Brass Contributor
Aug 17, 2017
Solved

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.

  • SergeiBaklan's avatar
    SergeiBaklan
    Aug 17, 2017

    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

     

    • SergeiBaklan's avatar
      SergeiBaklan
      MVP

      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

       

  • 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?

Resources