Check Sheet Logo
Check Sheet

COUNTUNIQUE

The COUNTUNIQUE formula in Google Sheets returns the number of unique values in a range of cells. It is commonly used to count the number of distinct items in a set of data.

Usage

Use the COUNTUNIQUE formula with the syntax shown below, it has 1 required parameter and 1 optional parameter:

=COUNTUNIQUE(value1, [value2, ...])
Parameters:
  1. value1 (required):
    The first value or range of values to count the unique values from.
  2. value2, ... (optional):
    Additional values or ranges of values to count the unique values from.

Examples

Here are a few example use cases that explain how to use the COUNTUNIQUE formula in Google Sheets.

Counting unique values in a single column

The COUNTUNIQUE formula can be used to count the number of unique values in a single column of data.

Counting unique values in multiple columns

By combining the COUNTUNIQUE formula with the {} operator in Google Sheets, you can count the number of unique values across multiple columns of data.

Removing duplicates from a dataset

The COUNTUNIQUE formula can be used in conjunction with other formulas, such as QUERY and UNIQUE, to remove duplicate values from a dataset.

Common Mistakes

COUNTUNIQUE not working? Here are some common mistakes people make when using the COUNTUNIQUE Google Sheets Formula:

Not including all values in the range

One common mistake is not including all values in the range when using COUNTUNIQUE. Make sure to select the entire range of values that you want to count unique values for.

Passing non-numeric values

COUNTUNIQUE only works with numeric values. If you pass non-numeric values, it will return an error. Make sure to only pass numeric values to the function.

Using a range that includes blank cells

COUNTUNIQUE counts unique values, including blank cells. If you don't want to include blank cells, make sure to filter them out of the range before using COUNTUNIQUE.

Using a range that includes duplicates

COUNTUNIQUE counts unique values, so if you have duplicates in your range, it will not count them. If you want to count duplicates, use the COUNT function instead.

Not wrapping text in double quotes

When passing a range of values to COUNTUNIQUE, make sure to wrap the range in double quotes. If you don't, it will return an error. For example, use COUNTUNIQUE("A1:A10") instead of COUNTUNIQUE(A1:A10).

The following functions are similar to COUNTUNIQUE or are often used with it in a formula:

  • COUNT

    The COUNT formula returns the number of numeric values within a specified range of cells. It is commonly used to count the number of entries in a given range that meet specific criteria, such as counting the number of sales above a certain threshold.

  • SUM

    The SUM function in Google Sheets adds up a range of numbers. This function is most commonly used to sum the values in a range of cells.

  • AVERAGE

    The AVERAGE function calculates the average (arithmetic mean) of the values passed to it. It is commonly used to find the average of a range of cells containing numerical data.

  • QUERY

    The QUERY function in Google Sheets is used to query data from a specified dataset. The function allows users to filter and sort data based on specific criteria. The function is commonly used in data analysis and reporting, as well as in creating dynamic dashboards.

  • UNIQUE

    The UNIQUE formula is used to return a list of unique values from a specified range. It is commonly used to remove duplicates from a dataset or to extract a list of unique values from a larger dataset.

Learn More

You can learn more about the COUNTUNIQUE Google Sheets function on Google Support.