The quickest way to get unique values in Excel is the UNIQUE function: type =UNIQUE(A2:A100) in an empty cell and press Enter. Excel spills a list of distinct values from that range below the formula, with duplicates removed. If your workbook predates Excel 2021 or Microsoft 365, use Data > Remove Duplicates on a copy of your data, or a helper formula with COUNTIF. All three routes are covered below, plus the traps that make people think UNIQUE is broken when it is not.
What You'll Need
- Excel 2021, Excel for Microsoft 365, Excel for the web, or a recent Excel for Mac (this includes UNIQUE). Older versions need Remove Duplicates or formulas instead.
- Your data in a clean range or an Excel Table, ideally with one header row and no blank rows in the middle.
- An empty area to the right of or below your data where the result can spill. A dynamic array formula fails with a #SPILL! error if cells beside it are occupied.
- File access to save the workbook, since the file must be saved as .xlsx for these features to persist.
Menu and ribbon names vary slightly between Excel versions, platforms and regions, so treat the exact labels below as the common wording rather than a guarantee of every build.
Step-by-Step
- Pick your source range. Click a cell, or select the whole block including the header if you want the header repeated. For a single column of names, something like A2:A500 is typical. If you selected a header, UNIQUE keeps it as the first result and you can move it aside or delete it.
- Choose an empty output cell. Click a cell with at least as many free rows below and columns to the right as the result might need. Leave adjacent cells blank; if anything sits in the spill area you will see #SPILL!.
- Type the formula. Enter =UNIQUE(A2:A500) and press Enter. Excel writes the distinct values downward, dropping the repeats and keeping the original order of first appearance. Blanks are treated as a value by default, so a truly empty cell near the end can show a 0.
- Check the result. Look at how many rows the formula filled. Click once inside the spilled list and Excel draws a thin blue border around the whole block with a small selection handle, which confirms it is one formula, not typed values.
- Get unique values only (ignore blanks). Replace the formula with =UNIQUE(FILTER(A2:A500,A2:A500<>"")). FILTER removes empty cells first, so the list contains only real entries.
- Return unique rows, not single values. Pass a two-dimensional range instead: =UNIQUE(A2:C500) gives back distinct combinations across those three columns, removing rows that repeat exactly. This is the fastest way to de-duplicate whole records without touching the originals.
- Get values that appear only once, or values with their counts. For values that occur exactly once, use =UNIQUE(FILTER(A2:A500,COUNTIF(A2:A500,A2:A500)=1)). For a distinct list with counts beside it, put =UNIQUE(A2:A500) in D2 and =COUNTIF(A2:A500,D2#) in E2; the hash sign refers to the whole spilled range, so one formula fills the count column.
- For older Excel: Remove Duplicates. Copy the column to a blank sheet first, because this command permanently deletes rows. Select the copied data, go to Data > Remove Duplicates, tick My data has headers if the first row is a heading, tick the column to check, and confirm. The dialog reports how many duplicates were removed. Your original sheet stays intact.
- For older Excel: a COUNTIF formula. In a helper column enter =COUNTIF($A$2:A2,A2) and fill down. Rows showing 1 are the first occurrence of each value. Filter that helper column to 1 to see the distinct list, or use Filter > Advanced Filter with Unique records only on a copied range.
- Turn the spill into a fixed list. If you need the values to stay put when the source changes, copy the spilled range and use Paste Special > Values. This breaks the link to the source, so the list no longer updates automatically.
Common Mistakes
- Leaving data in the spill area. Anything in the cells below or beside the formula triggers #SPILL!. Clear the block, then re-enter the formula.
- Using Remove Duplicates on live data. The command deletes rows for good. Work on a copy or a new sheet every time.
- Comparing values that only look identical. Trailing spaces, inconsistent casing and numbers stored as text (a green triangle in the corner) are all treated as different values. UNIQUE is case-insensitive, but "Smith" and "Smith " are two entries. Clean with TRIM or Text to Columns before de-duplicating.
- Forgetting that blanks count. A trailing blank cell can appear as 0 in the output. Wrap the range in FILTER or exclude the blank rows first.
- Expecting automatic updates after pasting values. Once you Paste Special > Values, the list is static. Keep the live formula on a separate sheet if you need both.
- Assuming UNIQUE sorts. It preserves the order of first appearance. Wrap it in SORT, as in =SORT(UNIQUE(A2:A500)), if you want an alphabetical list.
Tips
- Format the source as an Excel Table (Ctrl+T).
- Combine UNIQUE with SORTBY if you want the distinct list ordered by how often each value appears, using the COUNTIF counts as the sort key.
- Use the hash reference (D2#) wherever you would otherwise re-select a spilled range; it stays correct when the list grows or shrinks.
- If you only want a quick visual check rather than a list, use Conditional Formatting > Highlight Cells Rules > Duplicate Values on the column; unique entries can be highlighted with that rule's unique option.
- For counting distinct values in a single cell, =COUNTA(UNIQUE(A2:A500)) gives the number of distinct non-blank entries in supported versions.
Troubleshooting
#SPILL! error. Something blocks the output area. Click the error icon and choose Select Obstructing Cells to jump straight to the culprit, then clear them.
#NAME? error. The version does not recognise UNIQUE. Check your Excel version under File > Account; if it is older than Excel 2021 or not a Microsoft 365 build, switch to Remove Duplicates or the COUNTIF method.
Fewer results than expected. Check for trailing spaces, stray apostrophes and text-versus-number mismatches. Select the column and use Data > Text to Columns > Finish to coerce text-stored numbers, or clean with =TRIM(SUBSTITUTE(A2,CHAR(160)," ")) for non-breaking spaces pasted from web pages.
Formula results change when you sort the source. That is expected: the list follows the source order. Sort the output with SORT instead of sorting the source.
Spilled list disappears after sharing. Recipients on older Excel see a #SPILL! or #NAME? because their version lacks dynamic arrays. Paste the values before sending the file, or tell them what version is required.
Frequently Asked Questions
Does UNIQUE remove duplicates from my data?
No. It returns a separate list of distinct values while leaving the original cells untouched. Only Data > Remove Duplicates actually deletes rows.
Is UNIQUE case-sensitive?
No. "apple" and "Apple" are treated as the same value. Spaces and hidden characters are not ignored, though, so padding matters.
Can I use UNIQUE on multiple columns?
Yes. Give it a multi-column range and it returns distinct row combinations across those columns rather than unique entries per column.
Why does my result show a 0 or a blank?
Empty cells in the range are counted as a value. Wrap the range in FILTER to exclude blanks before passing it to UNIQUE.
Will the list update if I add new rows?
Yes, if the formula range includes the new rows or refers to an Excel Table. If you pasted values, it will not update.
What can I use instead in Excel 2019?
Remove Duplicates on a copy of the data, Advanced Filter with Unique records only, or a COUNTIF helper column that flags first occurrences.