UNIQUE returns the rows of a range with duplicates removed, in the order each one first appears. Use it to list the distinct customers, regions or products in a column, count how many there are, or feed a dropdown that grows as new values arrive.
Syntax
=UNIQUE(range, [by_column], [exactly_once])
range
The data to de-duplicate. With several columns, a row only counts as a duplicate if every column matches.
by_column
Optional, FALSE by default. TRUE compares columns instead of rows.
exactly_once
Optional, FALSE by default. TRUE returns only the values that appear exactly once, leaving out anything that repeats.
Practice UNIQUE
Task 1 of 2
Several clients ordered more than once. List each client once, starting in E2.
E2
fx
Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.
UNIQUE examples
Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.
A
B
C
D
E
1
Rep
Region
Product
Units
Revenue
2
Ava
West
Monitor
12
$2,400.00
3
Liam
East
Keyboard
30
$1,500.00
4
Maya
West
Mouse
45
$900.00
5
Noah
North
Monitor
8
$1,600.00
6
Zara
East
Monitor
15
$3,000.00
7
Omar
West
Keyboard
22
$1,100.00
Sales by rep
Formula
Result
What it shows
=UNIQUE(B2:B7)
West
East
North
Each region once, in order of first appearance.
=SORT(UNIQUE(C2:C7))
Keyboard
Monitor
Mouse
Distinct products, alphabetical.
=COUNTA(UNIQUE(B2:B7))
3
How many different regions there are.
=UNIQUE(B2:C7)
West
Monitor
East
Keyboard
West
Mouse
North
Monitor
East
Monitor
West
Keyboard
Unique region and product pairs (here every pair is different).
=UNIQUE(B2:B7, FALSE, TRUE)
North
Only the regions that appear exactly once.
Tips and common mistakes
UNIQUE is case-sensitive: "Acme" and "acme" are kept as two values. Normalise first with ARRAYFORMULA(PROPER(...)) or LOWER if that's a problem.
Stray spaces also create "duplicates" that look identical. Clean the column with TRIM first.
Wrap it in SORT for an alphabetical list, and in COUNTA to count distinct values.
With an open-ended range like B2:B, the empty cells below your data can add a blank entry to the list. Use UNIQUE(FILTER(B2:B, B2:B<>"")) to leave it out.