Excel tutorial
/

Functions

Intermediate

Excel RANK function: rank employees, students and products

RANK returns a value’s position in a list: 1st, 2nd… Descending and ascending order, ties, the $ trap, unique ranks and ranking within a group — with examples.

At the end of the month the manager asks: “Who is where in sales?”. You could sort the table, but that breaks the original order, and tomorrow’s new numbers mean doing it all again.

RANK works out each value’s position in a list without moving the table. When numbers change, the ranks update themselves.

Employee leaderboards, student scores, branch results, the fastest supplier — each is one formula.

Книга1 - Excel
—☐✕
C2fx=РАНГ(B2;$B$2:$B$7)
ABCD
1EmployeeSales (m)Rank
2Aziz485
3Dilnoza621
4Javohir553
5Malika621
6Sardor396
7Nodira514
8
Готово
The highest sales rank 1st. Dilnoza and Malika are tied (62) — both rank 1st, and the next rank is 3 (2nd is “skipped”)

Syntax

=РАНГ(number; ref; [order])

  • number — the value to rank (for example, B2).
  • ref — the whole list. Always lock it: $B$2:$B$7.
  • order — optional: 0 or omitted ranks descending (largest is 1st: sales, scores); 1 ranks ascending (smallest is 1st: time, cost, number of errors).

Its modern name is RANK.EQ — same result. RANK.AVG gives tied values an average rank (1.5 instead of 1 and 2).

Entering RANK step by step

1

Select C2 and type =РАНГ(B2; — the first argument is the sales figure on this row.

2

Select B2:B7 with the mouse and press F4 right away — it becomes $B$2:$B$7. Close the bracket and press Enter.

Книга1 - Excel
—☐✕
C2fx=РАНГ(B2;$B$2:$B$7)
ABCD
1EmployeeSales (m)Rank
2Aziz4815
3Dilnoza62
4Javohir55
5Malika62
6Sardor39
7Nodira512
8
ГотовоСреднее: 52,8333Количество: 6Сумма: 317

3

Double-click the fill handle at the corner of C2 — the formula copies down to the end of the table. Via fx: Вставить функцию → Statistical → RANK.EQ, with the fields Number, Ref and Order.

Книга1 - Excel
—☐✕
C2fx=РАНГ(B2;$B$2:$B$7)
ABCD
1EmployeeSales (m)Rank
2Aziz485
3Dilnoza62
4Javohir55
5Malika62
6Sardor39
7Nodira51
8
Готово
Книга1 - Excel
—☐✕
C5fx=РАНГ(B5;$B$2:$B$6;1)
ABCD
1DriverDelivery (min)Rank
2Bobur424
3Jasur382
4Otabek455
5Sherzod361
6Ulugbek403
7
Готово
Example 1: for time, less is better, so order = 1. Sherzod ranks 1st with 36 minutes
Книга1 - Excel
—☐✕
C6fx=РАНГ(B6;B6:B11)
ABCDE
1EmployeeSalesWrong: no $Correct
2Aziz4855
3Dilnoza6211
4Javohir5523
5Malika6211
6Sardor3926
7Nodira5114
8
Готово
Example 2: the most common mistake. Without $ the range slides down: Sardor (lowest, 39) became “2nd” and Nodira “1st”
Книга1 - Excel
—☐✕
D5fx=РАНГ(B5;$B$2:$B$7)+СЧЁТЕСЛИ($B$2:B5;B5)-1
ABCDE
1EmployeeSalesRANKUnique rank
2Aziz4855
3Dilnoza6211
4Javohir5533
5Malika6212
6Sardor3966
7Nodira5144
8
Готово
Example 3: COUNTIF with an “expanding” range ($B$2:B5) counts how many times the value already appeared above. The tie splits into 1 and 2

Pro level: rank within a group and a tie-breaker

  • Rank within a group (a separate ranking in each branch): =СЧЁТЕСЛИМН($A$2:$A$50;A2;$C$2:$C$50;">"&C2)+1 — A is the branch, C the sales. RANK can’t do this; COUNTIFS can.
  • Tie-breaker (equal sales → more customers ranks higher): =РАНГ(B2;$B$2:$B$7)+СЧЁТЕСЛИМН($B$2:$B$7;B2;$C$2:$C$7;">"&C2).
  • Percentile rank: =PERCENTRANK.INC($B$2:$B$7;B2) — “this employee beats 80% of the team”.
  • A leaderboard: once you have unique ranks (example 3), =ИНДЕКС($A$2:$A$7;ПОИСКПОЗ(1;$D$2:$D$7;0)) returns the 1st-place name; swap 1 for 2 and 3 to build a Top 3. In Excel 365, =СОРТ(A2:B7;2;-1) orders the whole table instantly.

Try it in the simulator

Type =РАНГ(B2;$B$2:$B$7) in C2 and fill it down to C7. Then type =РАНГ(B2;$B$2:$B$7)+СЧЁТЕСЛИ($B$2:B2;B2)-1 in D2 and fill it down too — how were the ties split?

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1EmployeeSales (m)RankUnique
2Aziz48
3Dilnoza62
4Javohir55
5Malika62
6Sardor39
7Nodira51
8
9
10
11
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

129 / 154