Excel UNIQUE Function Tutorial: What It Is and How to Use It – 2025

July 10, 2025

0
(0)

Excel UNIQUE Function Tutorial: What It Is and How to Use It

The UNIQUE function is one of Excel’s most powerful dynamic array formulas, allowing you to quickly extract distinct values from a range or array. Whether you’re working with lists of names, product IDs, or other datasets that contain repeated entries, this function helps clean and organize your data efficiently.

Introduced in Excel 365 and Excel 2019, the UNIQUE function is a real game changer, especially when combined with other dynamic array functions like SORT, FILTER, or SEQUENCE.

This article will walk you through everything you need to know about using the UNIQUE function, including syntax, examples, common use cases, and helpful tips to avoid mistakes.

What Is the UNIQUE Function?

Excel UNIQUE Function

The UNIQUE function returns a list of unique values from a range or array. It can filter out duplicates in both vertical and horizontal arrays and even return unique rows when required.

This function is dynamic, meaning it automatically spills the result into neighboring cells without needing to drag the formula down.

Syntax of the UNIQUE Function

sql
=UNIQUE(array, [by_col], [exactly_once])

Arguments

  • array (required): The range or array from which to extract unique values.

  • by_col (optional): A logical value (TRUE/FALSE) that indicates whether to compare values by row (default) or by column.

    • FALSE (or omitted): Compare by rows (vertical lists).

    • TRUE: Compare by columns (horizontal arrays).

  • exactly_once (optional): A logical value that returns only values that appear exactly once.

    • FALSE (default): Returns all distinct values.

    • TRUE: Returns only items that appear once.

Example 1: Extract Unique Values from a List

Suppose you have a list of names in cells A2:A10, some of which are repeated:

css
John
Emily
John
Mark
Anna
Emily
Tom

To get a list of unique names:

makefile
=UNIQUE(A2:A10)

Excel will spill the result downward and show each name only once.

Result:

css
John
Emily
Mark
Anna
Tom

Example 2: Return Unique Rows from a Table

If you have a two-column range (e.g., A2:B6), where rows may be repeated:

css
Name Score
John 90
Emily 85
John 90
Mark 95
Emily 85

Use:

makefile
=UNIQUE(A2:B6)

This returns only distinct combinations of Name and Score:

Excel UNIQUE Function2

css
John 90
Emily 85
Mark 95

Example 3: Use “exactly_once” to Return Truly Unique Values

Let’s say you only want values that appear exactly once in a list. For example, in A2:A8:

mathematica
Red
Blue
Green
Red
Blue
Yellow
Pink

Use:

php
=UNIQUE(A2:A8,,TRUE)

Result:

mathematica
Green
Yellow
Pink

These are the only colors that appear once.

Example 4: Unique Values by Column

If your data is arranged horizontally (in one row), like:

css
A1:G1 = {Apple, Banana, Apple, Grape, Banana, Orange, Pear}

Use:

php
=UNIQUE(A1:G1, TRUE)

This returns:

Excel UNIQUE Function3

mathematica
Apple Banana Grape Orange Pear

Example 5: Combine UNIQUE with SORT

You can make the result more readable by sorting it:

makefile
=SORT(UNIQUE(A2:A10))

This gives you a list of unique values in ascending order.

You can also use SORT(UNIQUE(...), , , TRUE) for descending order.

Using UNIQUE with FILTER

Suppose you want to extract a list of unique values that meet a certain condition. For example, in a sales dataset, you might want to find unique products sold in a specific region.

Let’s say:

  • A2:A100 = Product Names

  • B2:B100 = Region

To get unique products sold in “North”:

php
=UNIQUE(FILTER(A2:A100, B2:B100="North"))

Advantages of Using UNIQUE

  • Automatically updates when new data is added.

  • Reduces need for helper columns or complex pivot tables.

  • Supports dynamic arrays without requiring Ctrl+Shift+Enter.

  • Great for dashboards and summaries.

Limitations and Compatibility

  • Only available in Excel 365 and Excel 2019 (not supported in Excel 2016 or older).

  • Doesn’t work with merged cells.

  • May return a #SPILL! error if there’s no space for results.

Troubleshooting Common Errors

#SPILL! Error

This happens when the result doesn’t have enough empty space to display. Clear any content blocking the spill range.

Wrong Results Due to Formatting

Make sure your data types are consistent (text vs number). 123 is not the same as "123" in Excel.

Incorrect Output with Merged Cells

Avoid using merged cells in the input array.

Practical Use Cases

  • Remove duplicates from lists.

  • Summarize customer names, product SKUs, or categories.

  • Count how many unique items exist with =COUNTA(UNIQUE(...)).

  • Filter unique entries per condition for sales reports or student databases.

  • Build dynamic dropdowns using Data Validation and UNIQUE.

Conclusion

The UNIQUE function in Excel offers a streamlined and highly flexible way to clean, filter, and analyze data. It saves time, reduces manual effort, and works perfectly in combination with other functions like SORT, FILTER, and COUNTA.

Whether you’re working on a student attendance tracker, an inventory system, or financial analysis, mastering UNIQUE can help you simplify your workflow and enhance the clarity of your reports.

Practice with sample data and experiment with different combinations to make the most of this modern Excel tool.

How useful was this guide?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments