The RANK function
RANK tells you where a value comes in a list: 1st, 2nd, 3rd and so on. By default the highest number is 1st, which suits scores and sales; set order to 1 when lower is better, as with times.
Tied values share the same rank, and the next rank is skipped: two teams joint 3rd are followed by 5th.
=RANK(number, ref, [order])
Arguments
- number
- The value to rank, usually the cell on the current row.
- ref
- The full list of values to rank it against.
- orderoptional
- 0 or left out ranks the biggest as 1st. Any other number, such as 1, ranks the smallest as 1st.
Try it
=RANK(B2,$B$2:$B$6) in C2. Two teams scored more than 47, so Red Lions are 3rd.
C2
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Team | Score | Place | |
| 2 | Red Lions | 47 | 3 | |
| 3 | Night Owls | 52 | ||
| 4 | Table Four | 47 | ||
| 5 | Brainstormers | 39 | ||
| 6 | The Regulars | 55 | ||
| 7 | ||||
| 8 |
Edit the formula in C2, or change the data, and press Enter.
More examples
| Formula | Result | What it does |
|---|---|---|
| =RANK(B6,$B$2:$B$6) | 1 | The Regulars have the top score. |
| =RANK(B4,$B$2:$B$6) | 3 | Table Four also scored 47, so they're joint 3rd. No team is 4th; Brainstormers are 5th. |
| =RANK(B5,$B$2:$B$6,1) | 1 | With order 1, the lowest score ranks 1st. |
| =RANK(40,$B$2:$B$6) | #N/A | 40 isn't in the list, so it can't be ranked. |
Tips
- Lock the list with
$B$2:$B$6so it stays the same as you fill the formula down. - RANK.EQ is the newer name for the same function. RANK.AVG gives tied values the average of their places (3.5 instead of 3).
- To show the top three, LARGE returns the values themselves; RANK labels each row.
Common mistakes
- Ranks drift and repeat as you fill down.The list reference wasn't locked, so it moved with each row. Add dollar signs:
$B$2:$B$6. - The fastest time is ranked last.By default the biggest number is 1st. Add
1as the third argument when lower is better. - #N/A appears.The number isn't in the list, often because one of them is stored as text.
Practise RANK with instant feedback
Type real formulas into a working spreadsheet and get told straight away whether they work.