RANK


Description Computes the rank of a specified value in a specified array of numbers. By default, the array is sorted in descending order, but you may choose to sort it in ascending order.

Syntax RANK (number, array [,order])
Argument Description
number The member of array that you want ranked. If the function finds more than one of number in array, it will return the rank of the first instance it finds. If the function doesn't find number in array, it will return the #N/A! error. Text in the argument list that converts to a number will be evaluated as a number; otherwise the function will return the #VALUE! error. Text referenced in cells will return the #VALUE! error. Logical values are evaluated as 1 if TRUE and 0 if FALSE.
array A list of from 2 to 8191 numbers, in the form of a range reference or array constant. Text and logical values are ignored.
[order] Optional. Specifies whether you want the array sorted in ascending or descending order. Enter 0 to sort the list in descending order. Enter any nonzero number to sort the list in ascending order. If this argument is omitted, 0 is used.

Examples This function returns 5:

RANK (3, {5, 1, 8, 3, 0, 4, 8, 3, 2})

This function returns 4:

RANK (3, {5, 1, 8, 3, 0, 4, 8, 3, 2},1)

See Also PERCENTILE, PERCENTRANK, QUARTILE