
Dynamic ArrayLevel: ExpertAvailable in: Excel 365 / 2021+
In this article
- Syntax
- Examples
- Example 1
- Example 2
- Example 3
- Power combo
- Related functions
UNIQUE returns the distinct values of a range, updating automatically as data changes.
Syntax
=UNIQUE(array, [by_col], [exactly_once])
| Argument |
What it means |
array |
Range to de-duplicate. |
by_col |
TRUE to compare columns instead of rows. |
exactly_once |
TRUE to return only values that appear once. |
Examples
Example 1
=SORT(UNIQUE(B2:B500))
Sorted region list.
Example 2
=COUNTA(UNIQUE(C2:C500))
Number of distinct customers.
Example 3
=UNIQUE(A2:A500, , TRUE)
IDs that appear only once.
Power combo
=LET(r, UNIQUE(B2:B500), HSTACK(r, SUMIFS(E2:E500, B2:B500, r)))
A mini pivot: each region with its total, in one formula.
FILTER · SORT · COUNTA
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
✨ Ask AI about this articleStuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong