Spread Formula Reference
RANK
Formula Functions > Functions R to S > RANK

This function returns the rank of a number in a set of numbers. If you were to sort the set, the rank of the number would be its position in the list.

Syntax

RANK(number,array,order)

Arguments

This function has these arguments:

Argument Description
number Number whose rank you want to return
array Reference to the set of numbers
order [Optional] How the number is ranked, either in descending order (0 or omitted) or ascending order (non-zero value)

Remarks

This function gives duplicate numbers the same rank. The presence of duplicate numbers affects the ranks of subsequent numbers. For example, in a list of integers, if the number 12 appears twice and has a rank of 4, then 13 would have a rank of 6 (no number would have a rank of 5).

Data Types

Accepts numeric data for the number argument, a reference for the array argument, and numeric data for the order argument. Returns numeric data.

Examples

RANK(B3,B1:B8,1)

RANK(R3C2,R1C2:R8C2,1)

RANK(16,{2,4,8,16,32},1) gives the result 4

Version Available

This function is available in product version 1.0 or later.

See Also

MEDIAN | MODE | Statistical Functions