### RANK Function In Excel

This Excel Tutorial demonstrates how to use the Excel RANK Function in Excel to rank a number within a series, with formula examples.

## RANK Function Description:

The RANK Function Rank of a number within a series.

## Formula Examples: Example Formula Result
1 =RANK(D5,\$B\$5:\$B\$10) 5
2 =RANK(D6,\$B\$5:\$B\$10) 3
3 =RANK(D7,\$B\$5:\$B\$10) 1
4 =RANK(D8,\$B\$5:\$B\$10,E8) 1
5 =RANK(D9,\$B\$5:\$B\$10,E9) 4
6 =RANK(D10,\$B\$5:\$B\$10,E10) 6

## Syntax and Arguments:

The Syntax for the RANK Formula is:

### Function Arguments ( Inputs ):

number – The number that you wish to determine the rank of.

ref – An array of numbers.

order – OPTIONAL. A number indicating whether to rank descendingly (0 or Ommitted) or ascendingly (non-zero number)

## RANK Examples in VBA

You can also use the RANK function in VBA. Type:
`application.worksheetfunction.rank(number,ref,order)`

Executing the following VBA statements

will produce the following results For the function arguments (number, etc.), you can either enter them directly into the function, or define variables to use instead.

`=AND(`  