The RANK function calculates the rank of a number in a list of numbers. The rank of a number is its size relative to the other numbers in the list.
The arguments for the function are:
number |
the number in the list that we want to rank. |
ref |
the reference for the list of numbers, usually an array, range or range name. |
order |
determines whether the rank is to be calculated against a list sorted in descending or ascending order: setting order at 0 (or omitting it) sorts in descending order, at 1 or >1 sorts in ascending order. |
For example:
RANK(12, {6, 8, 2, 4, 14, 12, 10}, 0)
returns 2; whereas:
RANK(12, {6, 8, 2, 4, 14, 12, 10}, 1)
returns 6.
See also: