Excel Tutorials

How to Use the UNIQUE Function

Get a live, auto-updating list of distinct values without deleting or touching a single row of your original data. This lesson uses the Event Planner workbook from Excel Foundations, free to download below.

Return to Class

Download the Event Planner Workbook

Follow along in the same file used in the video. No email required.

⬇ Event Planner Workbook (.xlsx)

What Does the UNIQUE Function Do?

UNIQUE is a dynamic array function that reads a range, figures out every distinct value in it, and spills that list of unique values into as many cells as it needs, starting from wherever you typed the formula. Nothing about the original range is touched, deleted, or reordered, UNIQUE just produces a fresh, separate, live list.

That "live" part is what sets it apart from Remove Duplicates: change the source data and the UNIQUE list updates itself automatically, where Remove Duplicates only runs once, as a one-time, permanent deletion.

How to Use UNIQUE

Step-by-step, matching the video above.

1

Click an empty cell

Pick a cell with enough open space below and to the right, this is where the spilled list will appear.

2

Type the formula

=UNIQUE(A2:A100), pointing at the range you want distinct values from, then press Enter.

3

Watch it spill

The result automatically fills downward into as many cells as there are unique values, no dragging or copying required.

4

Edit the source data and watch it update

Change a value in the original range and the UNIQUE list recalculates itself immediately, the same as any other live formula.

5

Sort the result if needed

Wrap it in SORT: =SORT(UNIQUE(A2:A100)) returns the distinct values already in ascending order.

6

Count the unique values

=COUNTA(UNIQUE(A2:A100)) or =ROWS(UNIQUE(A2:A100)) both return a single number: how many distinct values were found.

Worked Example
A: Source (Vendor)=UNIQUE(A2:A7)
Acme SupplyAcme Supply
Bolt & CoBolt & Co
Acme SupplyParty Rentals
Party Rentals
Acme Supply
Bolt & Co

Six rows of source data with Acme Supply appearing three times and Bolt & Co twice, UNIQUE spills back exactly three distinct vendor names, in the order they first appeared, all from a single formula entered once in the top cell.

UNIQUE's Optional Arguments

Beyond the basic range, UNIQUE takes two more optional arguments that change its behavior significantly.

by_col: checking columns instead of rows

=UNIQUE(A1:F2,TRUE) compares entire columns for uniqueness instead of rows, useful when your data runs sideways rather than down.

exactly_once: only values with no duplicates

=UNIQUE(A2:A100,,TRUE) returns only values that appear exactly one single time, excluding anything that repeats even once. This is genuinely different from a plain distinct list, which would still include a value that appeared five times, just listed once.

Combining both arguments

=UNIQUE(range,TRUE,TRUE) applies exactly_once logic column-by-column instead of row-by-row, for the rare case both behaviors are needed together.

UNIQUE vs. Remove Duplicates: Which to Use

Both find distinct values, but they're built for genuinely different situations.

UNIQUE is non-destructive and live

It creates a separate list elsewhere and updates automatically as source data changes, your original data is never touched.

Remove Duplicates is a one-time, permanent action

It deletes duplicate rows directly from the data itself, a single operation that doesn't update automatically afterward.

Version compatibility matters too

UNIQUE requires Excel 365 or 2021+. Remove Duplicates works in every version, including much older ones, which can be the deciding factor for a file shared widely.

Combining UNIQUE With Other Functions

UNIQUE becomes considerably more useful nested inside, or wrapped around, other functions.

UNIQUE + FILTER for a conditional distinct list

=UNIQUE(FILTER(A:A,B:B="Approved")) returns only the distinct values from column A where column B specifically says "Approved," skipping everything else entirely.

UNIQUE + SORT for an alphabetized list

=SORT(UNIQUE(A2:A100)) is one of the most common combinations, a clean, alphabetized, distinct list in a single formula.

UNIQUE as a source for a drop-down list

Since the result is a live range, it can be pointed at directly from Data Validation to build a drop-down that automatically includes new distinct values as they show up in the source data.

Common UNIQUE Mistakes to Avoid

⚠️

Using UNIQUE in an unsupported Excel version

Excel 2019, 2016 and earlier don't have UNIQUE at all, and will show a #NAME? error instead. Confirm the Excel version before building a workbook around it.

⚠️

Not leaving room for the spill

If cells below or beside the formula already contain data, UNIQUE can't spill into them and returns a #SPILL! error instead of a result. Clear the blocking cells or start the formula somewhere with open space.

⚠️

Trying to edit a spilled cell directly

Only the top-left cell holds the actual formula, the rest of the spilled range is generated automatically and can't be edited individually. Edit the source formula instead.

⚠️

Misreading exactly_once as "all unique values"

With the third argument set to TRUE, UNIQUE excludes anything that repeats at all, even twice. It's a stricter filter than plain deduplication, not just a different way of saying the same thing.

Beyond the Spreadsheet

3 Distinct Lists You Build by Hand.Already Unique in Updoot.

A distinct list shouldn't need a formula to stay accurate.

📇
You build a unique list of
Customer or lead names
Sales CRM
Every contact is already a single, unique record
🏷️
You build a unique list of
Assets or inventory items
Asset Tracking
No duplicate entries to filter out
You build a unique list of
Approved vendors
Purchasing & Approvals
Vendor list is already clean, live, and accurate

Free 14-day trial. No credit card required.

Frequently Asked Questions

What does the UNIQUE function do in Excel?

UNIQUE returns a list of distinct values from a range, automatically spilling into as many cells as needed, without changing or deleting anything in the original data.

What Excel version do I need for UNIQUE?

Excel 365 or Excel 2021 and later, along with Excel for the web. Older versions like Excel 2019 or 2016 don't support it and will show a #NAME? error.

What's the difference between UNIQUE and Remove Duplicates?

UNIQUE creates a new, separate, live list of distinct values and leaves your original data untouched. Remove Duplicates permanently deletes duplicate rows from the data itself.

Does UNIQUE change my original data?

No. It reads from the range you give it and displays the result elsewhere, the source range is never modified.

What is a #SPILL! error and why did I get one?

It means something, usually existing data, is blocking the cells UNIQUE needs to spill its results into. Clear the blocking cells or move the formula somewhere with enough open space below and to the right.

How do I sort the results of UNIQUE?

Wrap it in SORT, like =SORT(UNIQUE(A2:A100)), to get the distinct values back in ascending order automatically.

What does the exactly_once argument do?

Setting the third argument to TRUE, like UNIQUE(range,,TRUE), returns only values that appear exactly one single time in the range, excluding anything that repeats at all, even once.

Can UNIQUE check uniqueness across multiple columns?

Yes, if you select a multi-column range, UNIQUE compares entire rows and returns each distinct row combination rather than single values.

How do I count how many unique values UNIQUE found?

Wrap it in COUNTA or ROWS, like =COUNTA(UNIQUE(A2:A100)), to get a single number representing the total distinct count.

Can I combine UNIQUE with FILTER?

Yes, nesting FILTER inside UNIQUE, like =UNIQUE(FILTER(A:A,B:B="Approved")), returns only the distinct values from column A where column B says Approved.

Ready for lists that stay accurate on their own?

Every business starts with a spreadsheet. Updoot is where you scale past it, records are unique and current automatically.

Start Your Free Trial →