How to Rank in Excel (Including Ties)
If scores are in B2:B10, RANK.EQ ranks them from the highest. Lock the range with $ so it does not move when you copy the formula down.
Formula to use
=RANK.EQ(B2, $B$2:$B$10)Highest score is 1st
What happens with ties
RANK.EQ gives tied values the same rank and skips the next one (1, 1, 3). RANK.AVG gives the average of the tied ranks (1.5, 1.5, 3).
=RANK.AVG(B2, $B$2:$B$10)Average rank for ties
Smallest value is 1st
For values where smaller is better, such as race times or defect counts, put 1 in the third argument.
=RANK.EQ(B2, $B$2:$B$10, 1)Ascending rank
Rank 1, 2, 3… without ties
To put the person higher in the list first when scores tie, add how many times the same score has appeared above.
=RANK.EQ(B2, $B$2:$B$10)+COUNTIF($B$2:B2, B2)-1The earlier row ranks higher
Rank within a class or department
Count the people in the same class (column A) with a higher score, then add 1. That is the rank within the class.
=COUNTIFS($A$2:$A$10, A2, $B$2:$B$10, ">"&B2)+1Rank within the group in column A
Try the functions used here
Change the arguments in the function playground and watch the calculation step by step.
- RANK.EQ functionReturns the rank of a value within a range.
- RANK.AVG functionReturns the rank of a value within a range. Ties get the average of their ranks.
- RANK functionReturns the rank of a value within a range. A compatibility function that calculates the same as RANK.EQ.
- COUNTIFS functionCounts the rows that meet all of several conditions.
- COUNTIF functionCounts the cells in a range that meet a condition.
- LARGE functionReturns the k-th largest value.
FAQ
- Are RANK and RANK.EQ different?
- They give the same result. RANK remains for compatibility with earlier versions, so RANK.EQ is the better choice.
- What about blanks or "Absent"?
- Cells in the range that are not numbers are left out of the comparison. Ranking such a cell itself gives an error, so wrap the formula in IFERROR to leave it blank.