ID EN
#Statistical

RANK

Excel Functions

Rank a number against a range of numbers

Syntax

EXCEL
=RANK(number, ref, [order])

Arguments

Parameter Description
number The number to rank.
ref A range that contains numbers to rank against.
order [optional] Whether to rank in ascending or descending order.

Return Value

A number that indicates rank.

Details

The RANK function returns the rank of a numeric value compared to a list of other numeric values. RANK can rank values from largest to smallest (i.e., the rank of highest test scores) and smallest to largest (i.e., the rank of fastest times in a race). You can use the RANK function to calculate the rank of each value in a dataset. RANK works fine with sorted or unsorted data — it is not necessary to sort the values in the list before using the RANK function. The basic syntax for RANK looks like this: where number is the value you want to rank, ref is a range that contains numbers to rank against, and order is an optional argument for controlling ranking direction. By default, RANK will rank values in descending order and assign 1 to the largest value in the list. However, this behavior can

Examples

Syntax

The basic syntax for RANK looks like this:

EXCEL
=RANK(number,ref,[order])
Ranking in descending or ascending order

The rank function has two modes of operation, descending and ascending, which are controlled by the order argument. To rank values where the largest v

EXCEL
=RANK(A1,range) // rank descending (default)
=RANK(A1,range,0) // rank descending
Ranking in descending or ascending order

To rank values where the smallest value should be 1, set order to 1:

EXCEL
=RANK(A1,range,1) // rank ascending
Example - ranking test scores in descending order

In the worksheet below, the goal is to rank test scores. For test scores, the highest score should be assigned a rank of 1, so the RANK function is us

EXCEL
=RANK(C5,$C$5:$C$12)
Example - ranking race times in ascending order

In the example below, the goal is to rank race times. This is an example of where we want to assign a rank of 1 to the fastest time, which will be the

EXCEL
=RANK(C5,$C$5:$C$12,1)

See Also

RANK.EQ RANK.AVG SMALL LARGE