How to rank items by multiple columns in Google Sheets?

To rank items by multiple columns in Google Sheets, you can use the SORT function. This function allows you to specify multiple columns with different sorting orders. Additionally, you can use the FILTER function to filter out only the items that have a certain rank. This is how to rank items by multiple columns in Google Sheets.


You can use the following syntax to rank items by multiple columns in Google Sheets:

=RANK(B2,$B$2:$B$11)+SUMPRODUCT(--($B$2:$B$11=$B2),--(C2<$C$2:$C$11))

This particular formula ranks items in descending order first by the values in column B, then by the values in column C.

The following example shows how to use this formula in practice.

Example: Rank Items by Multiple Columns in Google Sheets

Suppose we have the following dataset in Google Sheets that shows the points and assists for 10 different basketball players:

Now suppose we’d like to rank these players from best to worst, assigning a value of “1” to the best player and “10” to the worst player.

We’ll rank the players from best to worst based on the value in the Points column. If there are ties, we’ll then refer to the value in the Assists column.

We’ll use the following formula to rank the players:

=RANK(B2,$B$2:$B$11)+SUMPRODUCT(--($B$2:$B$11=$B2),--(C2<$C$2:$C$11))

The following screenshot shows how to use this formula in practice:

The player with a ranking of 1 is considered the best and the player with a ranking of 10 is considered the worst.

Here’s how our formula worked:

  • Rank the players from best to worst based on the value in the Points column.
  • If there are ties, refer to the value in the Assists column.

For example, players A and B tied for having the most points. However, player A had more assists so they received a ranking of 1 and player B received a ranking of 2.

If you’d like to rank the players in ascending order (1=worst, 10 =best) then we can use the following formula:

=RANK(B2,$B$2:$B$11, 1)+SUMPRODUCT(--($B$2:$B$11=$B2),--(C2<$C$2:$C$11))+1

The following screenshot shows how to use this formula in practice:

The “best” player now has a ranking of 10 and the “worst” player has a ranking of 1.

The following tutorials explain how to perform other common operations in Google Sheets:

x