totn Excel Functions

MS Excel: How to use the RANK Function (WS)

This Excel tutorial explains how to use the Excel RANK function with syntax and examples.

Description

The Microsoft Excel RANK function returns the rank of a number within a set of numbers.

The RANK function is a built-in function in Excel that is categorized as a Statistical Function. It can be used as a worksheet function (WS) in Excel. As a worksheet function, the RANK function can be entered as part of a formula in a cell of a worksheet.

Syntax

The syntax for the RANK function in Microsoft Excel is:

RANK( number, array, [order] )

Parameters or Arguments

number
The number to find the rank for.
array
A range or array of numbers to use for ranking purposes.
order
Optional. It specifies how to rank the numbers.

Returns

The RANK function returns a numeric value.

Note

  • If order is 0, the numbers are ranked in descending order.
  • If order is not 0, the numbers are ranked in ascending order.
  • If the order parameter is omitted, it assumes order is 0 (descending order).

Applies To

  • Excel for Office 365, Excel 2019, Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

Type of Function

  • Worksheet function (WS)

Example (as Worksheet Function)

Let's look at some Excel RANK function examples and explore how to use the RANK function as a worksheet function in Microsoft Excel:

Microsoft Excel

Based on the Excel spreadsheet above, the following RANK examples would return:

=RANK(A4, A2:A6, 1)
Result: 5

=RANK(A4, A2:A6, 0)
Result: 1

=RANK(A3, A2:A6, 0)
Result: 4