RANK.EQ function
Returns the rank of a number in a list, such as a rep's place in a sales league; ties share the highest rank.
Available in Excel 2010 and later, Microsoft 365, Excel for the web, Excel for Mac 2011 and later
Excel 2010 and laterWorks in Google Sheets
Syntax
RANK.EQ(number, ref, [order])| Argument | What it means | |
|---|---|---|
number | Required | The value to rank. |
ref | Required | The list of numbers to rank against. Text and empty cells are ignored. |
order | Optional | 0 or omitted: descending, largest = 1 (sales, scores). Non-zero: ascending, smallest = 1 (times, costs). |
Returns: A whole number rank; tied values get the same (best) rank and the next rank is skipped.
How RANK.EQ works
RANK.EQ tells you the position of a value within a list: 1st, 2nd, 3rd and so on. Use it for sales leaderboards, class rankings, product performance tables or supplier comparisons. By default the largest value is rank 1, which suits revenue or scores; for lap times, costs or response times where smaller is better, set order to 1.
Ties are handled the "competition" way: equal values get the same rank and the following rank is skipped, giving 1, 1, 3. This is the same behaviour as the older RANK function. If you prefer tied values to share the average position (1.5, 1.5, 3), use RANK.AVG. To break ties, add a COUNTIF on the rows above. Always lock the reference with dollar signs before copying down.
Examples
1Sales league table
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Sales | |
| 2 | Ana | 840 | |
| 3 | Ben | 920 | |
| 4 | Chloe | 760 | |
| 5 | Dev | 920 | |
| 6 | Eva | 880 | 3 |
| 7 | Finn | 760 |
Result: 3
Eva's 880 is beaten only by the two 920s, so she is ranked 3. Ben and Dev both rank 1, and rank 2 is skipped.
2Fastest time ranks first
| A | B | C | |
|---|---|---|---|
| 1 | Driver | Route time (min) | |
| 2 | Ana | 42 | |
| 3 | Ben | 38 | 1 |
| 4 | Chloe | 45 | |
| 5 | Dev | 40 |
Result: 1
With order 1 the smallest value is rank 1. Ben's 38 minutes is the quickest, rank 1.
3Break ties by order of appearance
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Sales | |
| 2 | Ana | 840 | |
| 3 | Ben | 920 | |
| 4 | Chloe | 760 | |
| 5 | Dev | 920 | 2 |
| 6 | Eva | 880 | |
| 7 | Finn | 760 |
Result: 2
Dev ties with Ben at 920 (rank 1). COUNTIF counts how many earlier rows already hold 920 (one: Ben), so Dev becomes 2 and every rank is unique. Ben's row gives 1 + 0 = 1.
4Rank within a group
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Region | Rep | Sales | |
| 2 | North | Ana | 840 | 2 |
| 3 | South | Ben | 920 | |
| 4 | North | Chloe | 760 | |
| 5 | South | Dev | 880 | |
| 6 | North | Eva | 900 |
Result: 2
There is no RANKIFS, so count how many reps in the same region sold more, then add 1. Ana's 840 is beaten only by Eva's 900 in the North, so she ranks 2nd within her region.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#N/A | number is not in ref (often a rounding or text-number mismatch). | Rank values taken from the same list; convert text to numbers. |
Ranks change when copying | ref was not locked with $. | Use an absolute reference such as $B$2:$B$7. |
Tips
=SORTBY(A2:B7, B2:B7, -1)in Microsoft 365 builds a sorted leaderboard without any RANK columns.- RANK.EQ ignores text and blanks in
ref, so a missing figure does not count as last place.
Questions
What is the difference between RANK, RANK.EQ and RANK.AVG?
RANK and RANK.EQ are identical: ties share the best rank. RANK.AVG gives ties the average of their positions.
How do I rank without gaps after ties (1, 1, 2)?
That is a "dense" rank. In Microsoft 365: =XMATCH(B2, SORT(UNIQUE($B$2:$B$7),,-1)).
How do I rank from lowest to highest?
Set the third argument to 1: =RANK.EQ(B2, $B$2:$B$7, 1).
Google Sheets
RANK.EQ also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
RANK.EQ in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | PLADS.LIGE |
| Dutch | RANG.GELIJK |
| Finnish | ARVON.MUKAAN.TASAN |
| French | EQUATION.RANG |
| German | RANG.GLEICH |
| Hungarian | RANG.EGY |
| Italian | RANGO.UG |
| Norwegian (Bokmål) | RANG.EKV |
| Polish | POZYCJA.NAJW |
| Portuguese (Brazil) | ORDEM.EQ |
| Portuguese (Portugal) | ORDEM.EQ |
| Russian | РАНГ.РВ |
| Spanish | JERARQUIA.EQV |
| Swedish | RANG.EKV |
| Turkish | RANK.EŞİT |