MS Excel: RANK Function (WS)
In Microsoft Excel, the RANK function returns the rank of a number within a set of numbers.
Syntax
The syntax for the RANK function is:
RANK( number, array, [order] )
number is the number to find the rank for.
array is a range or array of numbers to use for ranking purposes.
order is optional. It specifies how to rank the numbers.
If order is 0, it ranks numbers in descending order.
If order is not 0, it ranks numbers in ascending order.
If the order parameter is omitted, the RANK function assumes order is 0 (descending order).
Applies To
- Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Type of Function
- Worksheet function (WS)
Worksheet Function Example
Let's take a look at an example to see how you would use the RANK function in a worksheet:

Based on the Excel spreadsheet above, the RANK function would return the following:
| =RANK(A4, A2:A6, 1) | would return 5 |
| =RANK(A4, A2:A6, 0) | would return 1 |
| =RANK(A3, A2:A6, 0) | would return 4 |