Category: FUNCTION | Updated: 2026-11-20
How to Use the UNIQUE Function in Google Sheets | Remove Duplicates and Create a Unique List
How to Use the UNIQUE Function
The UNIQUE function automatically removes duplicate entries from a specified range and returns a list of unique values. It is very handy for extracting a client list from sales logs or summarizing unique survey responses.
Syntax
=UNIQUE(range, [by_column], [exactly_once])
- range: The cell range from which to remove duplicates (required).
- by_column:
FALSE(default) to remove duplicate rows vertically, orTRUEto remove duplicate columns horizontally (optional). - exactly_once:
FALSE(default) to return one instance of every unique value, orTRUEto return only values that appear exactly once (optional).
Table Example
Here is an example of removing duplicates from the "Purchase History (Product Name)" in Column A and automatically creating a unique product list starting at cell C2.
| Row | Column A (Purchase History) | Column B | Column C (Unique Product List) |
|---|---|---|---|
| 1 | Purchase History | Unique Product List | |
| 2 | Apple | =UNIQUE(A2:A6) |
|
| 3 | Mandarin Orange | Mandarin Orange | |
| 4 | Apple | Grape | |
| 5 | Grape | ||
| 6 | Mandarin Orange |
- Formula in cell C2:
=UNIQUE(A2:A6) - Result: The 3 unique items—
Apple,Mandarin Orange, andGrape—automatically spill in the order they first appear.
Common Errors and Notes
- Spaces and formatting variations are treated as separate values:
"Apple"and"Apple "(with a trailing space), or full-width vs. half-width character differences, look identical visually but will not be deduplicated. - Blank cells are also extracted as a unique item: If
rangecontains blank cells, one blank row may appear in the output. Combine withFILTER—such as=UNIQUE(FILTER(A2:A20, A2:A20<>""))—to cleanly exclude blanks. - Spill destination overwrite conflict (
#REF!error): If other data occupies the cells where the unique list needs to spill vertically (or horizontally), a#REF!error occurs.
Frequently Asked Questions
Q. How does UNIQUE determine duplicates when multiple columns are specified?
A. When multiple columns (e.g., A2:B20) are specified, rows where the combination of values across all specified columns is identical are treated as duplicates and consolidated into a single row.
Q. Can I sort the unique list extracted by UNIQUE in alphabetical or ascending order?
A. Yes. Combining it with SORT like =SORT(UNIQUE(A2:A50)) automatically creates a cleanly sorted master list with duplicates removed.