Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel UNIQUE Multiple Columns: Step-by-Step Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To get unique rows across multiple columns in Excel, select your data range, go to Data > Remove Duplicates, tick every column that defines a unique record, and click OK. That gives you a static list of distinct rows. If you need a formula that updates automatically, use =UNIQUE(A2:C100) in Microsoft 365 or Excel 2021 and later, where UNIQUE spills a dynamic array of unique rows. The rest of this guide covers both methods, when to use each, and how to fix the errors that trip people up.

What You'll Need

  • Excel for Microsoft 365, Excel 2021, or Excel 2024 for the UNIQUE function; older versions can use Remove Duplicates or a helper-column workaround.
  • A data range with a header row, ideally formatted as an Excel Table (Ctrl+T) so ranges expand automatically.
  • An empty area to the right of or below your data if you use a formula, because UNIQUE spills results into neighbouring cells.
  • Basic awareness that menu labels differ slightly by Excel version, platform (Windows, Mac, web) and region, so wording may not match exactly.

Step-by-Step

  1. Clean your range first. Remove blank rows, merged cells and trailing spaces. UNIQUE treats "Apple" and "Apple " as different values, so select the columns and use Find & Replace (Ctrl+H) to replace double spaces with single spaces, or use TRIM in a helper column. Merged cells break both Remove Duplicates and UNIQUE, so unmerge them (Home > Merge & Center) before continuing.
  2. Decide what "unique" means for your data. A unique row is defined by the combination of columns you choose. If you have First Name, Last Name and Email, ticking all three returns rows where the full combination is distinct; ticking only Email returns one row per email address. Write down which columns form the key before you start.
  3. Method A — Remove Duplicates (static result). Select the entire range including headers, then go to Data > Remove Duplicates. In the dialog, click Unselect All, then tick only the columns that define uniqueness. Leave "My data has headers" ticked if row 1 contains labels. Click OK. Excel reports how many duplicates were removed and how many unique values remain. This edits your data in place, so copy the sheet first if you need the original.
  4. Method B — the UNIQUE function (dynamic result). Click an empty cell outside your data, for example E2, and type =UNIQUE(A2:C100). Press Enter. Excel spills the unique rows downward and to the right. If you want unique values from a single column only, use =UNIQUE(A2:A100). To return rows that appear exactly once (no repeats at all), use =UNIQUE(A2:C100,,TRUE); the third argument set to TRUE means "exactly once" rather than "distinct".
  5. Add a header to the spill. UNIQUE does not copy headers. Type your headers manually in the row above the spill, or wrap the formula so it includes them: =VSTACK(A1:C1,UNIQUE(A2:C100)) in Microsoft 365. Keep at least one blank row between the formula and any other content, otherwise you get a #SPILL! error.
  6. Sort the result if needed. Wrap the formula in SORT: =SORT(UNIQUE(A2:C100)) sorts by the first column. To sort by the second column, use =SORT(UNIQUE(A2:C100),2,1). This keeps the list self-updating when source data changes.
  7. Convert the spill to values if you need to share it. Select the spilled range, copy (Ctrl+C), then Paste Special > Values. This freezes the result so it no longer depends on the source range — useful when emailing the file to someone on an older Excel version.
  8. Verify the count. Compare the number of rows returned with a quick check: =COUNTA(UNIQUE(A2:A100)) counts distinct values in one column, and =ROWS(UNIQUE(A2:C100)) counts distinct rows across the three columns. If the numbers look wrong, revisit step 1 — hidden spaces and case differences are the usual culprits.

Common Mistakes

  • Ticking the wrong columns in Remove Duplicates. Ticking every column means a row is only removed if every cell matches exactly. If you want one row per customer, tick only the customer ID or email column, not the order date.
  • Forgetting that UNIQUE is case-sensitive in its comparison behaviour. UNIQUE treats "apple" and "Apple" as different values. If case should not matter, standardise the text first with PROPER or LOWER in a helper column.
  • Leaving no room for the spill. If cells below or to the right of the formula contain data, Excel returns #SPILL!. Clear the area or move the formula.
  • Using UNIQUE in an old Excel version. Excel 2019 and earlier do not have UNIQUE; the formula returns #NAME?. Use Remove Duplicates or a COUNTIF helper column instead.
  • Editing a single cell inside a spill. Excel blocks changes to part of a spilled range. Edit the formula cell itself, or copy the spill and paste as values first.
  • Assuming Remove Duplicates keeps the first row. It keeps the first occurrence in the current order, but if the sheet is sorted differently the kept row changes. Sort deliberately before running it.

Tips

  • Format source data as a Table (Ctrl+T) and reference it by name, e.g. =UNIQUE(SalesData), so the formula picks up new rows automatically.
  • Combine UNIQUE with FILTER for conditional distinct lists: =UNIQUE(FILTER(A2:C100,D2:D100="Open")) returns unique rows only where a status column says Open.
  • Use =UNIQUE(TOCOL(A2:C100,1)) to flatten several columns into one distinct list, ignoring blanks — handy for building dropdown sources.
  • Name the spill range with a defined name (Formulas > Name Manager) so data validation lists and charts can point at it reliably.
  • Keep a backup copy of the sheet before running Remove Duplicates; it is not undoable in the usual sense once you save.

Troubleshooting

  • #SPILL! error: something is blocking the output area. Select the formula cell, check the dashed border showing the intended spill, and clear any content inside it.
  • #NAME? error: your Excel version does not support UNIQUE, or the function name is misspelled. Check File > Account to see your version, then fall back to Remove Duplicates.
  • #CALC! error: UNIQUE found no values to return, often because the range is empty or FILTER removed everything. Widen the range or check your criteria.
  • Duplicates still appear: values probably differ by hidden spaces, non-printing characters or case. Use TRIM and CLEAN in a helper column, then run UNIQUE on the cleaned column.
  • Remove Duplicates removed too much: you ticked too few columns. Restore from your backup and rerun with the correct key columns ticked.
  • Formula stopped updating: calculation may be set to Manual. Go to Formulas > Calculation Options and choose Automatic.

Frequently Asked Questions

Can UNIQUE return values from more than one column at once?

Yes. Point UNIQUE at a multi-column range such as A2:C100 and it returns distinct rows based on the whole combination. If you want distinct values from each column separately, use one UNIQUE formula per column.

What is the difference between UNIQUE and Remove Duplicates?

Remove Duplicates permanently edits the selected range and produces a static result. UNIQUE is a formula that spills a live list which updates when the source data changes. Use Remove Duplicates for one-off cleanups and UNIQUE for reports that refresh.

Does UNIQUE work in Excel 2019 or Excel 2016?

No. UNIQUE is available in Microsoft 365, Excel 2021 and Excel 2024. In older versions, use Data > Remove Duplicates, or a helper column with COUNTIF to flag first occurrences.

How do I get rows that appear only once, not just distinct rows?

Add TRUE as the third argument: =UNIQUE(A2:C100,,TRUE). This excludes any row whose combination appears more than once, leaving only genuinely single-occurrence records.

Why does UNIQUE treat "Apple" and "apple" as different?

UNIQUE compares text case-sensitively. Standardise the column first with LOWER or UPPER in a helper column, then run UNIQUE on that column.

Can I use the UNIQUE result in a data validation dropdown?

Yes, in Microsoft 365 you can point a list validation at a spill range using the # operator, for example =$E$2#. The dropdown then grows or shrinks with the unique list.