# How to use RANK Function in Excel | A Step-By-Step Guide

In this tutorial, we’ll cover the basics of the RANK function and provide five examples of how to use it in different scenarios.

The RANK function in Excel is a statistical function that returns the rank of a number within a set of numbers. It calculates the rank based on the value of the number compared to the other numbers in the set. The syntax of the RANK function is as follows:

RANK(number, ref, [order])

Where:

• number: The value that you want to rank.
• ref: The range of data in which to rank the value.
• [order]: An optional argument that determines whether to rank the value in ascending or descending order. The default is ascending (0), but you can set it to descending (1) if necessary.

The RANK function returns the rank of the value in the set of data, with 1 being the highest rank and N being the lowest rank, where N is the number of values in the set of data. If two values have the same rank, the RANK function returns the same value for both.

In this example, we have a list of students and their marks. We want to get their rankings based on how high they scored. To do this, we will use the RANK function. Here’s a step-by-step guide:

1. Type =RANK( in the formula bar to start the RANK function.
2. Enter the value that you want to rank.
3. Enter a comma “,” and then enter the range of data in which to rank the value.
4. Enter a comma “,” and then input a 0, or you may skip this step. However, if you wish to rank them by descending order, replace the 0 with a 1. 5. Close the formula with a parenthesis, and press the Enter key to complete the RANK function. This function tells Excel to rank the selected number (B2) from the list in B2:B14.