RANK, LARGE and SMALL: Rank Sales Reps and List the Top 3
Ravindra Bagale wants a leaderboard of ten reps for the monthly meeting: each rep's rank, and the top three names on a slide. Two reps have the same sales of ₹3,92,000, so the ranks must handle a tie too.
RANK.EQ gives each number its position in a list (1 = biggest). LARGE(range, k) returns the k-th biggest number and SMALL(range, k) the k-th smallest. Combine LARGE or a no-tie rank with INDEX and MATCH to get the names.
Download the practice file (rank-large-small-top-n.xlsx)
Excel file, 7 KB. It has the sample data used below. All numbers in this workbook are fictional teaching data, not real company figures.
Quick answer
- In C2 type
=RANK.EQ(B2,$B$2:$B$11)and copy down. - For ranks without ties, in D2 type
=RANK.EQ(B2,$B$2:$B$11)+COUNTIF($B$2:B2,B2)-1. - Top values:
=LARGE($B$2:$B$11,1), then 2 and 3. - Top names:
=INDEX($A$2:$A$11,MATCH(1,$D$2:$D$11,0)), then 2 and 3. - Lowest value:
=SMALL($B$2:$B$11,1).
=RANK.EQ(B2,$B$2:$B$11)
=RANK.EQ(B2,$B$2:$B$11)+COUNTIF($B$2:B2,B2)-1
=INDEX($A$2:$A$11,MATCH(1,$D$2:$D$11,0))
The sales list and its ranks
| Rep | Sales | RANK.EQ | Rank (no ties) |
|---|---|---|---|
| Ravindra Bagale | ₹4,18,000 | 4 | 4 |
| Shraddha Bagale | ₹3,92,000 | 5 | 5 |
| Ruhi Bagale | ₹4,55,000 | 2 | 2 |
| Shahrukh | ₹3,92,000 | 5 | 6 |
| Amir | ₹3,01,000 | 9 | 9 |
| Salman | ₹4,76,000 | 1 | 1 |
| Zoya | ₹3,50,000 | 8 | 8 |
| Ravina | ₹2,87,000 | 10 | 10 |
| Raja | ₹4,33,000 | 3 | 3 |
| Rani | ₹3,65,000 | 7 | 7 |
Shraddha Bagale and Shahrukh both have ₹3,92,000, so RANK.EQ gives both rank 5 and no one gets rank 6. The no-tie column adds COUNTIF($B$2:B2,B2)-1: the first of the two keeps 5, the second becomes 6.
How the formulas work
RANK.EQ(B2,$B$2:$B$11)counts how many values are bigger than B2 and adds 1. The$signs keep the list fixed when you copy down.- Add a third argument
1for ascending order (smallest = 1), for example when lower delivery time is better. COUNTIF($B$2:B2,B2)counts how many times this value has appeared so far. The range grows as you copy down because only the start is locked.LARGE($B$2:$B$11,2)returns the second biggest value even if it is a tie.
Top 3 table
| Position | Value: LARGE | Name: INDEX + MATCH |
|---|---|---|
| 1 | ₹4,76,000 | Salman |
| 2 | ₹4,55,000 | Ruhi Bagale |
| 3 | ₹4,33,000 | Raja |
With Microsoft 365 you can also write =TAKE(SORTBY(A2:B11,B2:B11,-1),3) to spill the top 3 rows in one go.
RANK.EQ, RANK.AVG and RANK
- RANK.EQ: ties share the best rank (5, 5). Use this one.
- RANK.AVG: ties share the average rank (5.5, 5.5).
- RANK: the old name of RANK.EQ, kept for older files.
Ravindra Bagale's Tip
For a leaderboard, decide the tie rule before the meeting. If two reps share a rank, say so on the slide; quietly breaking the tie by row order makes one person unhappy for no reason.
Ravindra Bagale's Tip – मराठी
Leaderboard साठी tie चा नियम meeting आधीच ठरवा. दोन reps चा rank सारखा असेल तर slide वर तसंच दाखवा; row order ने गुपचूप tie तोडला तर एकजण विनाकारण नाराज होतो.
Ravindra Bagale's Tip – हिंदी
Leaderboard के लिए tie का नियम meeting से पहले तय कीजिए। दो reps का rank बराबर हो तो slide पर वैसा ही दिखाइए; row order से चुपचाप tie तोड़ने पर एक व्यक्ति बेवजह नाराज़ होता है।
Practice task
- Open the Leaderboard sheet. Check C2:C11 hold RANK.EQ.
- Find the two reps who share rank 5.
- Check D2:D11 give 1 to 10 with no repeats.
- Change Amir's sales to 500000 and watch the ranks and the top 3 table update.
- Add
=SMALL($B$2:$B$11,1)to find the lowest sales.
Learn it properly
Course lessons:
Related guides: INDEX and MATCH · UNIQUE, SORT and SORTBY: Lists That Update Themselves · COUNTIF and COUNTIFS · $ Signs in Excel: Relative, Absolute and Mixed References (F4)
Frequently asked questions
How do I rank from smallest to largest?
Add 1 as the third argument: =RANK.EQ(B2,$B$2:$B$11,1).
Why do my ranks skip a number?
Two values are equal, so they share a rank and the next rank is skipped. Use the COUNTIF tie-break if you need 1 to 10 without gaps.
How do I rank within each city?
Use COUNTIFS: =COUNTIFS($C$2:$C$11,C2,$B$2:$B$11,">"&B2)+1 counts bigger values in the same city.
Can a PivotTable show the top 3?
Yes. Click the Rep filter arrow > Value Filters > Top 10 and change 10 to 3.