RANK

Returns the rank of a specified value in a dataset. Learn more

Video field
Statistical

In Google Sheets, the RANK function is used to determine the rank of a specified value within a dataset.

The function compares the value to the other values in the dataset and returns its position or rank.

The syntax for the RANK function is as follows:

RANK(value, data, [is_ascending])

value: This is the value that you want to determine the rank for within the dataset.

data: This is the range or array of values that contains the dataset you want to rank the value in.

is_ascending: This is an optional parameter that determines the sort order of the ranking. If set to TRUE or omitted, the values in the dataset are ranked in ascending order (smallest to largest).

If set to FALSE, the values are ranked in descending order (largest to smallest).

Here's an example to help illustrate how the RANK function works:

Suppose you have a dataset in cells A2 to A6: 5, 9, 2, 7, 3. You want to find the rank of the value 7 within this dataset.

You can use the RANK function as follows:

=RANK(7, A2:A6)

The function will compare the value 7 with the values in the range A2 to A6 and return its rank. In this case, the value 7 has a rank of 2 because it is the second-largest value in the dataset.

If you want to specify the sort order explicitly, you can add the is_ascending parameter:

=RANK(7, A2:A6, FALSE)

In this case, the function will rank the value 7 in descending order, and its rank will be 4 because it is the fourth-largest value in the dataset.

Note that if there are duplicate values in the dataset, the RANK function assigns the same rank to those values, and the next rank is skipped.

Want even more from Google Sheets?


With Softr, you can turn your spreadsheets into powerful web apps.You can give advanced roles and permissions to each user, build advanced logic and automation flows, customize the design to your needs, and much more.


Softr also offers a growing library of templates for internal tools, client portals, community hubs, and more. The templates come with a Google Sheet or an Airtable base that you can use to store and manage your data easily.


Try Softr now and build your custom web apps in 10 minutes no code required!

Client Portal | Internal Tools | Web App Builder | Free Website Builder Made with Softr