Excel & Google Sheets Function
RANK function in Excel (with interactive examples)
RANK returns the position of a number within a list of numbers, making leaderboards and percentile tables fast to build.
Syntax
=RANK(number, ref, [order])Live Interactive Exercise — Try it nowNo login required
Interactive practice grid (RANK reference)
Try our live spreadsheet engine: total Q1 sales in cell B5 using =SUM(B2:B4).
B5fx
| A | B | |
|---|---|---|
| 1 | Month | Sales |
| 2 | Jan | $1,100.00 |
| 3 | Feb | $1,350.00 |
| 4 | Mar | $1,550.00 |
| 5 | Total | type here |
Insert:
Arguments explained
| number | Required | Cell whose rank you want to find. |
| ref | Required | Locked list of numbers (e.g. $B$2:$B$10). |
| order | Optional | 0 or omitted for descending (largest = 1); 1 for ascending. |
Common errors & fixes
Ranks shift when dragging down: Lock the ref range with absolute references ($B$2:$B$10) using F4.
Excel vs Google Sheets
Identical in Google Sheets (RANK.EQ is also supported).
Practise RANK in a full 4-minute lesson
Every lesson is free to study — build real speed with instant feedback.
Free 1-Page Excel, Google Sheets & SQL Interview Cheat Sheet
The 25 formulas, keyboard shortcuts, and SQL patterns tested most in analyst interviews — emailed instantly, zero spam.