How can I count unique data in Google Sheets using multiple criteria?

To count unique data in Google Sheets using multiple criteria, you can use the COUNTIFS function. This function allows you to specify multiple criteria in different columns, and it will only count the cells that meet all of the specified criteria. This means that you can count the number of unique data points by selecting the range of cells to be counted and then specifying the criteria for each column. The function will then return the number of cells that meet all of the specified criteria, thus giving you the count of unique data based on the multiple criteria.


You can use the following basic syntax in Google Sheets to count unique values based on multiple criteria:

=COUNTUNIQUEIFS(A2:A11, B2:B11, "West", C2:C11, ">20")

This particular formula counts the number of unique values in the range A2:A11 based on both of the following two criteria being met:

  • The corresponding value in the range B2:B11 is “West”
  • The corresponding value in the range C2:C11 is greater than 20

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

Example: Count Unique Values Based on Multiple Criteria in Google Sheets

Suppose we have the following dataset in Google Sheets that shows the conference and points scored for various basketball players:

Suppose that we would like to count the number of unique players who meet the following criteria:

  • The player is in the West conference.
  • The player has greater than 20 points.

We can use the following formula to count the number of unique players who meet this criteria:

=COUNTUNIQUEIFS(A2:A11, B2:B11, "West", C2:C11, ">20")

We can type this formula into cell E2 of our spreadsheet:

Google Sheets count unique based on multiple criteria

From the output we can see there are 3 unique players that are in the West conference and have more than 20 points.

We can verify this is correct by manually identifying each player who meets both criteria:

Note: You can find the complete documentation for the COUNTUNIQUEIFS function in Google Sheets .

Additional Resources

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

x