Returns the rank of a number in a list of numbers. The rank of a number is its size relative to other values in a list. (If you were to sort the list, the rank of the number would be its position.)
IMPORTANT: This function has been replaced with one or more new functions that may provide improved accuracy and whose names better reflect their usage. Although this function is still available for backward compatibility, you should consider using the new functions from now on, because this function may not be available in future versions of Excel.
For more information about the new functions, see RANK.AVG function and RANK.EQ function.
The RANK function syntax has the following arguments:
Number Required. The number whose rank you want to find.
Ref Required. An array of, or a reference to, a list of numbers. Nonnumeric values in ref are ignored.
Order Optional. A number specifying how to rank number.
If order is 0 (zero) or omitted, Microsoft Excel ranks number as if ref were a list sorted in descending order.
If order is any nonzero value, Microsoft Excel ranks number as if ref were a list sorted in ascending order.