Google Sheets function
UNIQUE function in Google Sheets
UNIQUE in Google Sheets returns unique rows from a source range and keeps them in the order where they first appeared. Optional settings can compare columns instead of rows or return only entries that appear exactly once. Hidden trailing spaces can make apparent duplicates remain separate.
Source: Google Docs Editors HelpLast verified Nov 5, 2026
Syntax
=UNIQUE(range, [by_column], [exactly_once])Arguments
| Argument | Required | What it means |
|---|---|---|
range | Yes | The source data to filter for unique entries. |
by_column | No | TRUE to compare columns instead of rows. The default is FALSE. |
exactly_once | No | TRUE to return only entries with no duplicates. The default is FALSE. |
Examples
List each team once
| A | |
|---|---|
| 1 | Team |
| 2 | Ops |
| 3 | Sales |
| 4 | Ops |
| 5 | Support |
=UNIQUE(A2:A5)Result: Ops; Sales; Support
UNIQUE keeps the first Ops entry and discards the duplicate.
Common mistakes
Assuming two cells are identical when one contains trailing spaces.
Remove hidden spaces before checking for unique entries.
Expecting the result to be alphabetically sorted.
UNIQUE preserves first-appearance order. Wrap it in SORT when you need ordering.