FormulaCraft

UNIQUE function vs Remove Duplicates in Excel and Sheets

Topic:Duplicates & uniqueness

Heads up: Excel and Google Sheets do this differently.

Excel
=IFERROR(INDEX(A2:A6,MATCH(0,COUNTIF($C$1:C1,A2:A6),0)),"")
Google Sheets
=UNIQUE(A2:A6)

Verified example

Computed by a real spreadsheet engine on the sample data below.

Category
Fruit
Vegetable
Fruit
Dairy
Vegetable

=IFERROR(INDEX(A2:A6,MATCH(0,COUNTIF($C$1:C1,A2:A6),0)),"")

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Decide whether you need a live, updating list (use UNIQUE formula) or a permanent cleanup of your data (use Remove Duplicates tool).
  2. 2For the UNIQUE function in Excel 365 or Google Sheets, type =UNIQUE(A2:A6) in an empty cell — results spill automatically into adjacent cells.
  3. 3In Google Sheets, UNIQUE also works on multiple columns: =UNIQUE(A2:B6) returns rows where the combination of A and B is distinct.
  4. 4For Remove Duplicates in Excel: go to Data tab → Remove Duplicates; in Google Sheets: Data menu → Data cleanup → Remove duplicates.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Does UNIQUE exist in older Excel versions?

UNIQUE requires Excel 365 or Excel 2021. On older versions, use the Remove Duplicates tool or an array workaround with COUNTIF and INDEX.

Will UNIQUE update when I add new data?

Yes — as long as your source range is large enough or uses a full-column reference (A:A), the UNIQUE result refreshes automatically when data changes.

More on Duplicates & uniqueness

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: