Excel function

RANK.EQfunction

Returns the rank of a value within a range.

All versions
=RANK.EQ(B3, B2:D6, 0)
A
B
C
D
1
2
3
4
5
6

Drag the corner dots to change ref. Click a cell in the table to change number. Click a score. 88 appears twice, so both cells get the same rank. Try breaking it on purpose to see the errors.

Result

2

number
B3You can also click a cell in the table

The cell with the number to rank. Click another score in the table.

ref
B2:D6Drag the corner dots on the table

The cells to calculate. Cells that are not numbers are ignored.

order

0 (or omitted): the largest value ranks 1. 1: the smallest value ranks 1.

What is the RANK.EQ function?

=RANK.EQ(number, ref, [order])

RANK.EQ returns where a value ranks within a range, for example exam or sales rankings.

According to Microsoft, equal values get the same rank and the following ranks are skipped. Click the two 88 cells to compare.

RANK.EQ shows position in a list: class rankings, sales leaderboards, race times. Ties share a rank and the next rank is skipped, giving 1, 2, 2, 4. For a ranking within each group, use COUNTIFS.

Arguments

number
The value to rank.
ref
The values to compare against. Non-numbers are ignored.
order
0 or omitted: largest is 1st (descending). Any other value: smallest is 1st (ascending).

RANK.EQ examples

  1. Example 1. Score rank

    =RANK.EQ(B3, B2:D6, 0)

    92 comes after 95, so it ranks 2nd.

  2. Example 2. Tied scores

    =RANK.EQ(D3, B2:D6)

    88 appears twice; both rank 5th and the next, 87, ranks 7th.

  3. Example 3. When copying

    =RANK.EQ(B2, $B$2:$D$6)

    Lock the range with absolute references.

  4. Example 4. Descending and ascending

    =RANK.EQ(B2, $B$2:$B$6, order)

    Scores rank high to low (order 0); times rank low to high (order 1).

    ValueOrder 0 (descending)Order 1 (ascending)
    9515
    9224
    8832
    8832
    8051
  5. Example 5. Rank within a branch

    =COUNTIFS($A$2:$A$9, A2, $D$2:$D$9, ">"&D2)+1

    Counts larger sales in the same branch and adds 1. Seoul's 96000 is 1st within Seoul.

Common mistakes

FAQ

How is it different from RANK?
The result is the same. RANK is kept for compatibility.
Average rank for ties?
Use RANK.AVG.