SpreadJS Documentation > Formula Reference > Formula Functions > RANK.EQ |
This function returns the rank of a number in a set of numbers.
RANK.EQ(number,array,order)
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) |
The size of the returned number is relative to other values in the list. The top rank of that set of values is returned if more than one value has the same rank. Duplicate numbers are given the same rank. Duplicate numbers affect the ranks of subsequent numbers. For example, if the number of 11 is duplicated with a rank of 6 in a list of ascending numbers, the number 12 would have a rank of 8.
Accepts numeric data for the number argument, a reference for the array argument, and numeric data for the order argument. Returns numeric data.
RANK.EQ(B3,B1:B8,1)
RANK.EQ(R3C2,R1C2:R8C2,1)