Syntax
=RANK(number, ref, [order])
| Argument | What it means |
|---|---|
number | The number to rank. |
ref | The range of numbers to compare it with. |
order | Optional. 0 or left out ranks from largest. 1 ranks from smallest. |
Examples with results
Every result below is calculated by the practice engine on the sample data shown, not typed in by hand.
Class scores (fictional)
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Student | Maths | Science | English |
| 2 | Layla | 78 | 85 | 91 |
| 3 | Omar | 62 | 70 | 58 |
| 4 | Priya | 95 | 88 | 92 |
| 5 | Quinn | 45 | 52 | 61 |
| 6 | Rosa | 88 | 79 | 84 |
=RANK(B3,B2:B6)Omar’s position in Maths (1 = highest)
=RANK(B3,B2:B6,1)The same, counting from the lowest
Try it yourself
Change the formula or switch to other sample data.
Press Calculate to see the result.
The practice box runs in your browser with BDK’s own calculator, which covers about 60 common functions. Cell references work as in Excel (B2, B2:B9). Your formulas are not saved or sent anywhere. For anything unusual, check the result in Excel itself.
How people use RANK at work
- Education
Position of one student in a subject.
Data: Class scores (fictional)=RANK(D2,D2:D6) - Sales
Rank an order by quantity.
Data: Office supplies sales (fictional)=RANK(B3,B2:B9)
Common mistakes and tips
- Equal numbers get the same rank and the next rank is skipped.
- The reference range should be fixed with $ signs when you copy the formula down: $B$2:$B$6.
Works in
All versions of Excel, and Google Sheets.
Lessons that use it
Need Something Different? Let’s Talk.
Looking for different features or something built around your workflow? Share your idea with us.