ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Math
  3. RANK Function in Excel: Rank Scores and Sales

RANK Function in Excel: Rank Scores and Sales

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

RANK.EQ returns a number's position in a list. Write =RANK.EQ(B2,$B$2:$B$8) to rank the value in B2 against the whole column, with the largest value ranked 1. Add a third argument of 1 to rank smallest first. Tied values share a rank and the next rank is skipped. RANK does the same job and still works in every version of Excel.

Key takeaways

  • =RANK.EQ(number, ref, [order]) ranks largest = 1 by default; order 1 ranks smallest = 1.
  • Lock the list with $ signs so the range stays fixed when you fill the formula down.
  • Ties share the same rank and the next rank is skipped, so two 5ths are followed by a 7th.
  • Add COUNTIF($B$2:B2,B2)-1 to give every tied value a unique rank.
  • RANK gives positions; LARGE gives the value at a position; SORT builds the leaderboard.
On this page+
  1. What does the RANK function do?
  2. How to rank values from highest to lowest
  3. How to rank from lowest to highest
  4. How RANK handles ties
  5. How to break ties and get unique ranks
  6. RANK vs LARGE: position or value?
  7. How to turn ranks into a sorted leaderboard
  8. Common RANK mistakes
  9. Practise it

The RANK function in Excel tells you where each value stands in a list: 1st, 2nd, 3rd and so on. Today the main version is RANK.EQ, which ranks the largest value as 1 by default. This guide shows how to rank a sales team, how to rank smallest first, what happens with ties and how to break them, and how to turn ranks into a sorted leaderboard.

What does the RANK function do?#

RANK.EQ compares one number with a list and returns its position. It has three arguments:

Excel formula
=RANK.EQ(number, ref, [order])
ArgumentMeaningExample
numberThe value to rankB2
refThe full list to rank against$B$2:$B$8
orderOptional. 0 or left out = largest is 1; 1 = smallest is 11

There are three versions. RANK is the original and still works everywhere. RANK.EQ (Excel 2010 and later) gives the same results under a clearer name. RANK.AVG handles ties differently, as shown below.

The examples use this sales list in A1:B8:

AB
1RepSales
2Amira48,200
3Ben39,500
4Chloe52,750
5Dev39,500
6Elena61,300
7Farid44,100
8Grace35,800

How to rank values from highest to lowest#

Type the formula next to the first value, lock the list, and fill down.

  1. Click C2 and type =RANK.EQ(B2,$B$2:$B$8).
  2. Press Enter. Amira's rank is 3.
  3. Fill down to C8 (Windows: Ctrl+D; Mac: ⌘D).

The ranks are: Amira 3, Ben 5, Chloe 2, Dev 5, Elena 1, Farid 4, Grace 7.

The $ signs are the key detail. Without them, the list slides down one row each time you fill, and the last rows are ranked against a shrinking list. Press F4 (Windows) or ⌘T (Mac) after typing a range to add the dollar signs.

How to rank from lowest to highest#

Add 1 as the third argument when a smaller number is better, such as race times, costs or error counts.

Excel formula
=RANK.EQ(B2,$B$2:$B$8,1)

On the sales data, Grace becomes rank 1 and Elena rank 7. Ben and Dev share rank 2, so no one is 3rd.

How RANK handles ties#

Tied values get the same rank, and the next rank is skipped. Ben and Dev both sold 39,500, so both are 5th, and Grace is 7th. Nobody is 6th.

RANK.AVG gives tied values the average of the ranks they cover instead:

RepSalesRANK.EQRANK.AVG
Ben39,50055.5
Dev39,50055.5
Grace35,80077

Use RANK.EQ for leaderboards and competitions. RANK.AVG is mostly used in statistics. If you share files with people on Excel 2007 or older, use plain RANK: it behaves like RANK.EQ and opens everywhere. Newer Excel keeps RANK for compatibility, so old workbooks still calculate.

How to break ties and get unique ranks#

Add a COUNTIF that counts how many times the value has already appeared above, and subtract 1.

Excel formula
=RANK.EQ(B2,$B$2:$B$8)+COUNTIF($B$2:B2,B2)-1

The trick is the half-locked range $B$2:B2. It grows as you fill down: B2:B2, then B2:B3, and so on. For Ben (row 3), the value 39,500 appears once so far, so he keeps rank 5. For Dev (row 5), it has appeared twice, so Dev gets 5 + 2 - 1 = 6. Every rank is now unique, which helps when you need to look people up by rank.

This rewards whoever is higher in the list. For a fairer tie-break, such as fewer sick days, rank on a second column instead.

RANK vs LARGE: position or value?#

RANK and LARGE answer opposite questions. RANK takes a value and returns its position. LARGE takes a position and returns the value.

QuestionFormulaResult
What rank is Chloe?=RANK.EQ(B4,$B$2:$B$8)2
What is the 2nd highest sale?=LARGE($B$2:$B$8,2)52,750
What is the lowest sale?=SMALL($B$2:$B$8,1)35,800

Use LARGE and SMALL to build a top-3 list; use RANK to label every row. The lesson on LARGE and SMALL practises both, and the comparison of RANK vs LARGE goes deeper. To pull the names of the top performers, see how to build a top N list.

How to turn ranks into a sorted leaderboard#

In Excel 2021 or Microsoft 365, SORT can return the whole table ordered by sales, with no manual sorting.

Excel formula
=SORT(A2:C8,2,-1)

This sorts A2:C8 by its 2nd column (Sales), largest first (-1). The result spills into as many rows as needed, so leave empty space below the formula. Elena comes first, then Chloe, Amira and so on, with each rank beside the name. The SORT function guide explains every argument, and the SORT lesson lets you try it.

To sort by rank and then by name, read how to sort by multiple columns. For a list of distinct values in order, see unique sorted lists, and for choosing between the two sorting functions, see SORT vs SORTBY.

Common RANK mistakes#

Check these if the ranks look wrong:

  1. No $ signs. The list shifts as you fill down. Lock it: $B$2:$B$8.
  2. Wrong order. If the smallest value shows rank 1 by surprise, remove the 1 at the end.
  3. Numbers stored as text. Text values are ignored, and ranking one returns #N/A.
  4. Range too short. A value outside the list returns #N/A.
  5. Expecting no gaps after ties. RANK.EQ skips ranks after a tie; use the COUNTIF tie-breaker if you need 1 to 7 with no repeats.

Practise it#

Ranking questions are common in data analyst screening tests, often combined with LARGE or SORT. Practise LARGE and SMALL in a live spreadsheet: you type the formula and it checks it instantly. Then practise SORT to build a leaderboard, and try the data analyst Excel test when you're ready.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Where does Chloe rank by sales? Click C4 and use RANK.EQ to rank B4 against the locked list $B$2:$B$8, largest first.

fx
ABCD
1
Rep
Sales
Rank
2
Amira
48200
3
Ben
39500
4
Chloe
52750
5
Dev
39500
6
Elena
61300
7
Farid
44100
8
Grace
35800
9
10
11

Tip: The number to rank comes first, then the whole list with $ signs.

Practise this in a lesson

LessonLARGE and SMALLFind the second-highest, top 3 or second-lowest value, a favorite interview question.LessonSORT: order data with a formulaSort a table by any column, ascending or descending, and combine SORT with FILTER and UNIQUE.Function guideSORTSort a range with a formula using Excel's SORT. Sort by any column, highest first, or combined with FILTER. Includes a live exercise.

Frequently asked questions

How do I use the RANK function in Excel?

+

Type =RANK.EQ(B2,$B$2:$B$8) next to the first value and fill it down. The largest value gets rank 1. The $ signs keep the list the same for every row.

What is the difference between RANK, RANK.EQ and RANK.AVG?

+

RANK and RANK.EQ give the same result: tied values share the top rank of the tie. RANK.AVG gives tied values the average of their ranks, so two values tied for 5th both get 5.5.

How do I rank from lowest to highest in Excel?

+

Add 1 as the third argument: =RANK.EQ(B2,$B$2:$B$8,1). The smallest value then gets rank 1, which suits race times or costs.

How do I rank in Excel without duplicates?

+

Add a COUNTIF tie-breaker: =RANK.EQ(B2,$B$2:$B$8)+COUNTIF($B$2:B2,B2)-1. The first of two tied values keeps the rank and the second gets the next one.

Why does RANK return #N/A?

+

The number you are ranking isn't in the list, often because the range doesn't cover that row or the value is stored as text. Check the range and convert text to numbers.

Sources

  • RANK.EQ function - Microsoft Support
  • LARGE function - Microsoft Support
  • SORT function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does the RANK function do?
  2. How to rank values from highest to lowest
  3. How to rank from lowest to highest
  4. How RANK handles ties
  5. How to break ties and get unique ranks
  6. RANK vs LARGE: position or value?
  7. How to turn ranks into a sorted leaderboard
  8. Common RANK mistakes
  9. Practise it

Keep reading

Comparisons· 7 min read

RANK vs LARGE in Excel: Position vs Value

RANK and LARGE answer opposite questions. RANK takes a value and returns its position: =RANK(B2,$B$2:$B$7) says whether B2 is 1st, 2nd or 5th. LARGE takes a position and returns the value: =LARGE(B2:B7,2) gives the second highest number. Use RANK to label every row, and LARGE to build a top-N list.

Dynamic arrays· 6 min read

Make a Top 5 List With SORT and FILTER

To make a top 5 list with a formula, keep the rows whose value is at least the 5th largest, then sort them: =SORT(FILTER(A2:C9,C2:C9>=LARGE(C2:C9,5)),3,-1). Change 5 to 10 for a top 10 list. It spills the whole rows, largest first, and includes ties. It needs Excel 2021, Excel 2024 or Microsoft 365.

Dynamic arrays· 6 min read

Sort by Multiple Columns in Excel (Formula and Menu)

To sort by multiple columns in Excel, go to Data > Sort, pick the first column in Sort by, then click Add Level and pick the second column in Then by. For a live result, use a formula instead: =SORTBY(A2:C9,A2:A9,1,C2:C9,-1) sorts by column A from A to Z, then by column C from largest to smallest.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free