UNIQUE Function in Excel: Distinct List Without Remove Duplicates

UNIQUE Function in Excel: Distinct List Without Remove Duplicates featured illustration

πŸ“Ž This article includes 1 downloadable practice file ↓

⏱ 2 min readUpdated 5 October 2026

Dynamic ArrayLevel: ExpertAvailable in: Excel 365 / 2021+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. Example 3
  6. Power combo
  7. UNIQUE in practice
  8. Where you will use it
  9. Worked example
  10. Mistakes people make
  11. Related functions
  12. Continue learning

UNIQUE returns the distinct values of a range, updating automatically as data changes.

Advertisement

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.

UNIQUE in practice

Where you will use it

  • Distinct customer list
  • Values appearing only once
  • Dropdown sources

Worked example

Exactly onceFormulaResult
FALSE=TEXTJOIN(", ",,UNIQUE({"Pune";"Delhi";"Pune";"Goa"},,A2))Pune, Delhi, Goa
TRUE=TEXTJOIN(", ",,UNIQUE({"Pune";"Delhi";"Pune";"Goa"},,A3))Delhi, Goa
FALSE=TEXTJOIN(", ",,UNIQUE({"Pune";"Delhi";"Pune";"Goa"},,A4))Pune, Delhi, Goa

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
CaseUNIQUE ignores case
Trailing spacesTRIM first

FILTER Β· SORT Β· COUNTA

πŸ“š Part of the free Excel course: Beginner β†’ Expert Β· Try it in the Formula Lab or ask the AI Helper.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

πŸ“Ž Practice files for this article

  • πŸ“—
    Practice workbook: Dynamic arrays18 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 35 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong

Leave a Reply

Your email address will not be published. Required fields are marked *