Lookup & Reference
Modern
UNIQUE
Returns the distinct values from a range, removing duplicates.
Available in Microsoft 365 · Excel 2024 · Excel 2021 · Excel for the web. Not in 2019/2016.
Syntax
UNIQUE(array, [by_col], [exactly_once])What it returns
A spilled array of the distinct values.
Arguments
| Argument | Required | Description |
|---|---|---|
array |
Yes | The range to get distinct values from. |
by_col |
No | FALSE = compare rows (default), TRUE = compare columns. |
exactly_once |
No | TRUE = return only values that appear exactly once. |
Example
Source
| A | B | |
|---|---|---|
| 1 | Region | |
| 2 | North | |
| 3 | South | |
| 4 | North | |
| 5 | East | |
| 6 | South | |
| 7 | North | |
| 8 |
→
Result
| A | B | |
|---|---|---|
| 1 | Region | |
| 2 | North | |
| 3 | South | |
| 4 | East | |
| 5 |
=UNIQUE(A2:A8)Important to know
Spills into multiple cells.
Updates automatically as the source changes.
Often nested with SORT: =SORT(UNIQUE(...)).
365 / 2021+ only.
Related learning
No MEE lesson covers this function yet.


