How to Return Unique Values With UNIQUE in Excel (2026)

Knowing how to return unique values with UNIQUE in Excel turns a cluttered, repetitive column into a clean list with a single formula. Whether the sheet holds customer names, product codes or city entries, the steps below produce a duplicate-free result in moments while leaving the original data untouched.

Key Takeaways

  • Type =UNIQUE(A2:A20) in an empty cell, replacing A2:A20 with the actual data range, then press Enter.
  • The results spill into the cells below, so that area must be empty.
  • Use =UNIQUE(A2:A20,,TRUE) to return only the values that appear exactly once.
  • Format the source data as an Excel table so the list expands automatically when new rows are added.
  • UNIQUE works in Excel for Microsoft 365, Excel 2021, Excel 2024 and Excel for the web.

How to Return Unique Values With UNIQUE in Excel Step by Step

Picture an order log with customer names in cells A2 through A20. Some customers have ordered three or four times, but the goal is a list that shows each name only once. Here is how to build it.

  • Step 1: Open the workbook and locate the column containing the repeated values. In this example, the header is in A1 and the names are in A2:A20.
  • Step 2: Click an empty cell where the new list should begin, such as C2. Make sure there is plenty of blank space below it.
  • Step 3: Type =UNIQUE( to start the formula.
  • Step 4: Drag across A2:A20 to select the data, leaving out the header.
  • Step 5: Type a closing parenthesis so the formula reads =UNIQUE(A2:A20).
  • Step 6: Press Enter. Excel fills C2 and the cells below it with each different name. This automatic overflow is called a spill.
  • Step 7: Check the results. A name that appears five times in column A now shows up once in column C.

How to Return Unique Values With UNIQUE in Excel Step by Step

Tip: To edit the formula, select the first cell of the results, which is C2 in this example. The other cells in the spill range are controlled by that one formula.

Understand the UNIQUE Formula Settings

The full syntax is =UNIQUE(array,[by_col],[exactly_once]). Only the first part is required.

  • array: the range containing the values to be filtered down.
  • by_col: enter FALSE or leave it blank to compare rows, which suits data listed down a column. Enter TRUE to compare columns, which suits data listed across a row.
  • exactly_once: enter FALSE or leave it blank to list every different value once. Enter TRUE to list only the values that occur a single time.

Understand the UNIQUE Formula Settings

Return Values That Appear Only Once

Sometimes the real question is which customers ordered just one time. The third setting handles that.

  • Step 1: Select an empty cell with open space below it.
  • Step 2: Enter =UNIQUE(A2:A20,,TRUE). The two commas skip the by_col setting.
  • Step 3: Press Enter. Any name that appears two or more times is left out entirely.

Return Unique Values From a Row

For data that runs sideways, such as region names in B1 through K1, enter =UNIQUE(B1:K1,TRUE) in an empty cell and press Enter. The results spill to the right.

Return Unique Rows From Multiple Columns

Suppose first names sit in column A and last names in column B. Enter =UNIQUE(A2:B20) to return each different pairing. Two people who share a first name but have different last names both stay on the list, because Excel compares the whole row.

Keep the Unique List Updating Automatically

A fixed range such as A2:A20 ignores anything typed into row 21. An Excel table solves this, and it works like an elastic band that stretches around new entries.

  • Step 1: Click any cell inside the source data.
  • Step 2: Press Ctrl+T on Windows, or select Insert and then Table.
  • Step 3: Confirm the range, check the box for My table has headers if the data has a header row, and select OK.
  • Step 4: Click an empty cell outside the table and type =UNIQUE( to begin.
  • Step 5: Select the data cells in the table column, without the header. Excel inserts a reference such as Table1[Customer].
  • Step 6: Type the closing parenthesis and press Enter.

Tip: To show the unique list in alphabetical or numerical order, wrap the formula in SORT, as in =SORT(UNIQUE(Table1[Customer])).

Common Problems and Fixes

#SPILL! Error

Something is blocking the cells where the results need to go. Select the error cell to see the outlined spill area, then clear any text, spaces or merged cells inside it. A spilled formula also cannot sit inside an Excel table, so move it to a normal cell.

#NAME? Error

Check the spelling of UNIQUE first. If it is correct, the Excel version probably does not include the function. Excel 2019 and Excel 2016 do not support it, so open the file in Excel for the web or a supported desktop version.

A Zero Appears in the List

Blank cells inside the selected range can show up as 0. Use =UNIQUE(FILTER(A2:A20,LEN(A2:A20)>0)) to remove blanks before the unique list is created.

The Same Value Appears Twice

Two entries that look identical often differ by an extra space. Enter =UNIQUE(TRIM(A2:A20)) to strip leading, trailing and repeated spaces. Also check for numbers stored as text, since Excel treats the text version and the numeric version as different values. Converting the whole column to one data type fixes the mismatch.

#CALC! Error

This usually appears when exactly_once is set to TRUE and every value in the range is repeated, leaving nothing to return. Change the setting to FALSE to list each different value once. The same error can occur with the blank-removal formula if the entire range is empty.

#REF! Error With Another Workbook

If the formula pulls data from a second workbook, keep both files open. Dynamic array links can return #REF! when they refresh while the source workbook is closed.

Frequently Asked Questions

Which Excel versions support the UNIQUE function?

UNIQUE is available in Excel for Microsoft 365, Excel 2021, Excel 2024, Excel for the web and Excel mobile apps. Microsoft 365, Excel 2021 and Excel 2024 include it on both Windows and Mac.

Does UNIQUE delete duplicates from the original data?

No. UNIQUE creates a separate list of results and leaves the source range exactly as it was.

Is the UNIQUE function case-sensitive?

No. UNIQUE treats entries such as APPLE, Apple and apple as the same value.

What is the difference between the default result and exactly_once?

The default result lists every different value one time, including values that repeat in the source. Setting exactly_once to TRUE returns only the values that appear a single time in the source.

How can blank cells be excluded from UNIQUE results?

Use =UNIQUE(FILTER(A2:A20,LEN(A2:A20)>0)) and replace A2:A20 with the actual data range. FILTER removes the empty cells before UNIQUE builds the list.

Can UNIQUE results be sorted automatically?

Yes. Enter =SORT(UNIQUE(A2:A20)) to return the unique values in ascending order.

How can UNIQUE results be turned into fixed values?

Select the entire spill range and copy it. Right-click the destination cell and choose the Values option under Paste Options. The pasted list no longer changes when the source data changes.

Why does the unique list not include newly added data?

The new entries are likely outside the range in the formula. Expand the range or format the source data as an Excel table and reference the table column.

How can another formula refer to the whole unique list?

Type the address of the first result cell followed by the # symbol, such as C2#. This reference adjusts as the spill range grows or shrinks.

Picture of Roberto Gregoire
Roberto Gregoire

Roberto Gregoire is a Desktop Support Technician with over 7 years of experience fixing Windows and Microsoft Office problems for real users. He writes the way he troubleshoots: step by step, in order, with every instruction tested first. More about Roberto