Forum Discussion

mjlipari188's avatar
mjlipari188
Copper Contributor
Sep 27, 2020
Solved

Sort Scores, Return Corresponding Names

Hey everyone, would appreciate any help you can provide.   Trying to sort scores from highest to lowest and then return the corresponding name values in sorted order. For example, Team 1 has 10 poi...
  • HansVogelaar's avatar
    Sep 27, 2020

    mjlipari188 

     

    Here is a solution using two helper columns:

     

     

    C4 contains the formula

    =RANK(B4,$B$4:$B$9)+COUNTIF(B$4:B4,B4)-1

    This is filled down to C9. The formula returns the rank, breaking ties (note the different rank for Team 4 and Team 5).

     

    E4 to E9 contain the numbers 1 to 6.

     

    The formulas in F4 and G4 are

    =INDEX($A$4:$A$9,MATCH(E4,$C$4:$C$9,0))

    and

    =INDEX($B$4:$B$9,MATCH(E4,$C$4:$C$9,0))

    respectively. These are filled down to F9 and G9.

     

    See the attached sample workbook.

Resources