How do you count unique values in Google Sheets?

In Google Sheets, to count the number of unique values in a range of cells, you can use the COUNTUNIQUE function. This function takes two arguments, a range of cells, and an optional criteria range. The function will then count the number of unique values that meet the criteria in the specified range. This is a great way to quickly get a count of the number of unique values in a range of cells.


Often you may want to count the number of unique values in Google Sheets.

Fortunately this is easy to do using the COUNTUNIQUE() function.

The following examples show how to use this function in practice.

Example 1: Count Unique Values in One Column

The following screenshot shows how to use the COUNTUNIQUE() function to count the number of unique team names in column A:

There are 6 unique team names in column A.

Example 2: Count Unique Values in Multiple Columns

The following screenshot shows how to use the COUNTUNIQUE() function to count the number of unique team names in column A and column B:

There are 13 unique team names in column A and column B.

Example 3: Count Occurrences of Unique Values

To count how often each unique value occurs, you can first use the UNIQUE() function to display a list of unique team names:

You can then use the COUNTIF() function to count how often each unique team name occurs in column A:

From the output we can see:

  • Mavericks occurs 2 times.
  • Hornets occurs 3 times.
  • Nets occur 1 time.

And so on.

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

x