
The UNIQUE function in Google Sheets returns a list with the duplicates removed, and it updates when the data changes. Pair it with COUNTUNIQUE to count how many different values you have. This guide shows both with made-up data, plus how to sort the result, how to get only values that appear once and how to fix common errors.

UNIQUE syntax
The simplest form takes one range:
=UNIQUE(A2:A100)
If column A holds customer names with repeats, the result lists each name once. The results spill downward, so the cells below must be empty.
UNIQUE across several columns
UNIQUE also works on a table. It then removes rows that are repeated across all the columns:
=UNIQUE(A2:C100)
Two rows count as duplicates only when every column matches.
Sort the unique list
=SORT(UNIQUE(A2:A100))
This returns the unique values in alphabetical order.

Count unique values with COUNTUNIQUE
=COUNTUNIQUE(A2:A100)
This returns one number: how many different values the range has. With the made-up list Sara, Omar, Sara, Lina, Omar the result is 3.

Only values that appear once
UNIQUE has a third argument. Set it to TRUE to return only the values that appear exactly once:
=UNIQUE(A2:A100, FALSE, TRUE)
The second argument decides whether to compare by column instead of by row. Keep it FALSE for a normal list. With the same list, the result is Lina.

Unique values that meet a condition
Combine UNIQUE with FILTER. To list unique customers whose status in column C is Open:
=UNIQUE(FILTER(A2:A100, C2:C100 = "Open"))
See our guide to the FILTER function for more rules.
UNIQUE or remove duplicates?
UNIQUE leaves your source data as it is and gives you a separate list. The Remove duplicates tool changes the source range itself. Read how to remove duplicates in Google Sheets for that method.
Common UNIQUE mistakes
- Results blocked. Clear the cells below and to the right of the formula.
- Different spelling or spaces. "Sara" and "Sara " count as different values. Use TRIM first.
- Different case. If upper and lower case matter in your data, check the result against a few rows.
- Blank cells. A blank in the range can appear in the result. Filter blanks out first.
UNIQUE function in Google Sheets: common questions
Does Excel have UNIQUE?
Newer versions of Excel have a UNIQUE function. Check your version's help page.
Does UNIQUE update by itself?
Yes. When the source changes, the list changes.
Can I count how often each value appears?
Yes. Use the QUERY function with group by and count.
Related guides on Sheets AI Hub
Build a dashboard from your unique lists and use a drop-down list built from them.
