RANK

Given a value and a dataset, will return the rank of the specified value in the dataset

Parameter List

Syntax
RANK(valuedata
[is_ascending]
)
value

The value whose rank will be determined.

data

The array or range containing the dataset to consider.

[optional] is_ascending

Optional. Whether to consider the values in data in descending or ascending order. Default is 0.

More details

RANK returns the rank of a specified value in a dataset.

Examples

RANK(40, [10,20,30,40]) returns 1