COUNTUNIQUE Function – Google Sheets

The COUNTUNIQUE function counts the number of unique values in a data set. This function counts duplicate values once, regardless of how often they occur. This counting results in a total that reflects every unique value as one.

Get your copy of these examples in a live Google Sheet.

ℹ️ If you need a counting method that ignores capitalization, try this technique to create a case-insensitive formula.

COUNTUNIQUE Syntax

=COUNTUNIQUE(value1, [value2, …])

value1 – A value or range for which to count unique values

value2, … - [OPTIONAL] – Additional values or ranges for which to count unique values

Video Tutorial

Similar Functions

COUNT – Count the numeric values in a data set

COUNTA – Count the non-blank values in a data set

COUNTIF – Count the cells that match a criterion

COUNTIFS – Count the cells that match multiple criteria

COUNTUNIQUE – Count the unique values

COUNTUNIQUEIFS – Count the unique values that meet multiple criteria

COUNTBLANK – Count the blank cells

COUNTUNIQUE Examples

Example 1 – List of Items

Let’s start with a list of words. The list contains several repeated words, and you only want to count each word once.

List of words with duplicates being counted with the COUNTUNIQUE function
List of Items

The formula =COUNTUNIQUE(A1:A5) counts the words Pear, Peach, and Strawberry one time which results in a 3.

Example 2 – List of Numbers

Secondly, we will perform a similar count. This time with number values instead of character strings. We intend to find how many numbers are in the data set at least once.

List of numbers with uniques being counted by the COUNTUNIQUE function
List of Numbers

The formula =COUNTUNIQUE(A1:A4) counts the numbers 2 and 3 one time each which results in a 2.

Example 3 – Images

Now it’s time to have a little bit of fun! Let’s insert some images and see if Sheets knows there are only two unique images.

Several images being checked for duplicates
Images Being Checked

Well, it looks like we broke Google Sheets! There are two unique images in this list, but the function only returns 1.

Live Examples in Sheets

Go to this spreadsheet for several examples of the COUNTUNIQUE function that you can study and use anywhere you want.

Related Tutorials

Leave a Comment