MySheetAI
ProductWhat you can askPricing
Sign inAsk your data
MySheetAI
ProductWhat you can askPricingFormula generatorBlogChangelogFAQContactPrivacyTerms
© 2026 MySheetAI. All rights reserved.
Answers/How to List Distinct Values with the UNIQUE Function

How do I get a list of distinct values from a column, with duplicates removed?

UNIQUE returns every distinct value from a range, listing each one once and spilling the results down automatically: =UNIQUE(A2:A100).

Formula (Excel 365 and Excel 2021 or newer, and Google Sheets. Older Excel does not support UNIQUE; use Remove Duplicates on a copy of the data instead.)

=UNIQUE(A2:A100)

UNIQUE scans a range and returns each distinct value exactly once, in the order it first appears, spilling the results down the column below the formula. =UNIQUE(A2:A100) turns a column with repeated entries, like a list of customer names appearing once per order, into a single list with each name shown only once.

Pairing UNIQUE with COUNTA gives you a distinct count: =COUNTA(UNIQUE(A2:A100)) counts how many different values exist in the range, which is a different question than COUNTA(A2:A100) alone, which counts every row including repeats.

Step by step

  1. 1

    Select the range to scan for duplicates

    e.g. A2:A100, the full column of values you want de-duplicated.

  2. 2

    Write =UNIQUE(range)

    in an empty cell with room below it to spill the results.

  3. 3

    Wrap in COUNTA for a distinct count

    =COUNTA(UNIQUE(range)) tells you how many different values exist, not just how many rows.

Common questions

Does UNIQUE change or delete the original data?

No. UNIQUE returns a new list in a different location; it does not modify or remove anything from the source range.

What is the difference between UNIQUE and Remove Duplicates?

UNIQUE is a live formula that produces a separate list and updates automatically if the source changes. Remove Duplicates is a one-time action that permanently deletes repeated rows from the original data.

Related formulas

Related

How to Use FILTER to Return Only Rows That Match a Condition

Related

How to Remove Duplicate Rows in Excel and Google Sheets

Related

How to Use COUNTIF and COUNTIFS in Excel and Google Sheets

From the blog

How to Make Sense of Your Spreadsheet Data Without Being an Analyst

Want a formula written for your exact spreadsheet, not a generic example?

Try the free formula generator