Forum Discussion

  • kaheinchon 

    Some more recent options:

    = TAKE(SORTBY(Name, Number, -1), 1)

    gives just the name, whilst

    = TAKE(SORT(simpleTable, 2, -1), 1)

    gives both the maximum value and the associated name. 

  • kaheinchon 

    =INDEX('1901'!B2:B372, MATCH(MAX('1901'!C2:C372), '1901'!C2:C372, 0))

    or

    =XLOOKUP(MAX('1901'!C2:C372), '1901'!C2:C372, '1901'!B2:B372)

     

    Instead of MAX('1901'!C2:C372), you can use the address of the cell with the formula =MAX('1901'!C2:C372)

    • kaheinchon's avatar
      kaheinchon
      Copper Contributor
      Thanks!
      So since I'm filling in two separate cells with the number and corresponding name, would it be inverted from each other?

      To return the name:
      =INDEX('1901'!B:B,MATCH(MAX('1901'!C:C),'1901'!B:B,0))
      To return the number:
      =INDEX('1901'!C:C,MATCH(MAX('1901'!C:C),'1901'!C:C,0))
      • HansVogelaar's avatar
        HansVogelaar
        MVP

        kaheinchon 

        The formula for the number would be simply

         

        =MAX('1901'!C:C)

         

        Let's say that you enter this formula in A2. The corresponding name is returned by

         

        =INDEX('1901'!B:B,MATCH(A2,'1901'!C:C,0))

        or

        =XLOOKUP(A2,'1901'!C:C,'1901'!B:B)

Resources