The RANK function
Returns the rank of a number in a list, 1 for the largest by default. Equal numbers share a rank.
Syntax
RANK(number, ref, [order])- number
- The number to rank.
- ref
- The list of numbers to rank it in.
- order (optional)
- 0 or left out to rank from the largest, 1 to rank from the smallest.
Examples
D1
=RANK(1B3,2B2:B6)| A | B | C | D | |
|---|---|---|---|---|
| 1 | Store | Sales | 2 | |
| 2 | North | 1840 | ||
| 3 | Harbor | 2215 | ||
| 4 | Station | 1675 | ||
| 5 | Market | 2490 | ||
| 6 | Riverside | 1320 |
In plain words: Where 1the sales in B3 rank among 2all the sales in B2:B6, largest first.
D1=RANK(B3,B2:B6,1)
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Store | Sales | 4 | |
| 2 | North | 1840 | ||
| 3 | Harbor | 2215 | ||
| 4 | Station | 1675 | ||
| 5 | Market | 2490 | ||
| 6 | Riverside | 1320 |
Questions
Should I use RANK or RANK.EQ?
They give the same result. RANK.EQ is the newer name in Excel; RANK still works everywhere, including Google Sheets.