UNIQUE vs Remove Duplicates in Google Sheets: Live or Static, Letter Case, Spaces, Columns and Headers (2026)

Google Sheets gives you two built-in ways to get rid of duplicates: the UNIQUE function and the Data › Data cleanup › Remove duplicates command. They look interchangeable, but they disagree more often than you would expect: one is a live formula and the other deletes rows, one cares about letter case and the other doesn’t, and they don’t even compare the same columns by default. This guide puts them side by side on one small example, shows exactly where the results differ, and tells you which one to use for which job.

The short answer

Side by side

UNIQUE functionData cleanup › Remove duplicates
What it doesWrites the distinct rows somewhere elseDeletes the repeated rows from the selection
Original dataUntouchedChanged (undo or version history to go back)
New rows laterPicked up automatically (open range like A2:C)Not checked; run it again
Letter caseMatters: Ana@x.com ≠ ana@x.comIgnored: they are duplicates
Trailing / extra spacesMatterMatter (trim first)
Formatting and formulasHelp says format numbers the same way, or look-alike values can come back twiceIgnored: same value with different formatting or a formula counts as a duplicate
Columns comparedEvery column in the rangeOnly the columns you tick (the whole row is still deleted)
Which row survivesThe first appearance, in original orderThe first row of each group
Header rowStart the range below it, or it becomes part of the resultTick “Data has header row”
Values that appear once onlyUNIQUE(range, FALSE, TRUE)Not available

The behavior of Remove duplicates comes from Google’s help on removing duplicates and trimming whitespace (“Cells with identical values but different letter cases, formatting, or formulas are considered to be duplicates”); the UNIQUE details are from the UNIQUE help page and the tests below.

The example

A tab called Signups with a header row: Email in A, Name in B, Date in C.

RowA: EmailB: NameC: Date
2ana@x.comAna11/03
3bo@x.comBo11/04
4Ana@x.comAna11/03
5cy@x.comCy11/05
6bo@x.comBo11/04
7ana@x.com␣Ana11/06
8dee@x.comDee11/07
9bo@x.comBob11/08

Row 6 is an exact copy of row 3. Row 4 differs from row 2 only in the capital A. Row 7 has a trailing space after the email (shown as ␣). Row 9 is Bo again with a newer date and a different name. There are four real people.

What you runRows leftWhy
=UNIQUE(A2:C9)7Only row 6 is an exact copy; Ana@x.com is “different” because of the capital
Remove duplicates, all 3 columns ticked6Row 6 and row 4 go (case ignored); the space and Bob rows stay
=UNIQUE(A2:A9) (emails only)6 emailsana, bo, Ana, cy, ana␣, dee
Remove duplicates, only Email ticked5Rows 4, 6 and 9 go; the trailing-space row stays
Trim whitespace, then Remove duplicates on Email4One row per person; the first row of each is kept
LOWER/TRIM key formula (below)4Same four rows, source untouched

Two things to notice. First, the counts disagree before anyone has made a mistake: the tools simply define “duplicate” differently. Second, keeping the first row isn’t always right: Remove duplicates on Email dropped row 9, Bob’s newer entry. If the latest row should win, sort first or use keep the latest row per key.

UNIQUE in practice

In an empty area, or better on another tab, enter:

=UNIQUE(FILTER(Signups!A2:C, Signups!A2:A<>""))

UNIQUE returns each distinct row once, in the order it first appears. The FILTER is there because an open range like A2:C includes the empty rows below your data, and UNIQUE would otherwise return one blank row at the end. =UNIQUE(Signups!A2:C) on its own works too if you don’t mind that.

Ignore case and spaces, keep the original spelling

UNIQUE(LOWER(A2:A)) inside ARRAYFORMULA ignores case, but it also lowercases the output and works on one column. To match the way Remove duplicates thinks, keep whole rows and leave the source as typed:

=ARRAYFORMULA(LET(d, Signups!A2:C, k, LOWER(TRIM(Signups!A2:A)), FILTER(d, k<>"", XMATCH(k, k)=SEQUENCE(ROWS(k)))))

k is the lowercased, trimmed email of each row. XMATCH(k, k) gives the position where each email first appears, and SEQUENCE(ROWS(k)) is each row’s own position; they are equal only on the first occurrence, so FILTER keeps the first row per person. On the example it returns rows 2, 3, 5 and 8, the same four rows as Trim whitespace plus Remove duplicates on Email, without changing Signups. To put the header on top:

=VSTACK(Signups!A1:C1, ARRAYFORMULA(LET(d, Signups!A2:C, k, LOWER(TRIM(Signups!A2:A)), FILTER(d, k<>"", XMATCH(k, k)=SEQUENCE(ROWS(k))))))

Functions used: UNIQUE, FILTER, LET, XMATCH, SEQUENCE, TRIM, VSTACK and ARRAYFORMULA. For more on case, spaces, Gmail dots and phone formats, see duplicates that don’t match exactly.

Making a UNIQUE result static

Select the result, copy it, and choose Edit › Paste special › Values only (paste special), preferably on a new tab. You now have plain values that no longer follow the source. Doing this on top of the formula itself replaces it, which is fine once you are sure.

Remove duplicates in practice

  1. Duplicate the tab first (right-click the tab › Duplicate). The command changes your data.
  2. Select the whole table, all of its columns, including the header row. If you click a single cell inside the data, Sheets uses the whole range around it.
  3. Choose Data › Data cleanup › Remove duplicates.
  4. Tick Data has header row so the header isn’t treated as data and the column list shows your header names.
  5. Under columns to analyze, tick only the columns that define a duplicate, e.g. just Email. Rows that match on those columns are deleted whole, even if other columns differ.
  6. Click Remove duplicates. Sheets reports how many duplicate rows it removed and how many unique rows remain.

Which one should I use?

SituationUse
A clean list for a drop-down, dashboard or report that stays currentUNIQUE (or the key formula)
A one-off cleanup before a mailing or an importRemove duplicates, after Trim whitespace
Codes where Abc1 and ABC1 are different thingsUNIQUE
Emails or names where case shouldn’t matter, source must stayLOWER/TRIM key formula
You want to see the duplicates before anything is deletedhighlight them or count them first
Duplicates hold different amounts or notesMerge the rows, don’t delete
Two lists or tabs to combineUNIQUE with VSTACK

Pitfalls

FAQ

What is the difference between UNIQUE and Remove duplicates in Google Sheets?

UNIQUE is a formula: it writes a de-duplicated copy somewhere else, leaves the source alone and updates when the source changes. Data › Data cleanup › Remove duplicates is a one-time command that deletes the repeated rows from the data itself. UNIQUE compares text exactly, so letter case matters; Remove duplicates treats values that differ only in letter case as duplicates.

Is UNIQUE case-sensitive in Google Sheets?

Yes. UNIQUE keeps Ana@x.com and ana@x.com as two values. To ignore case, compare a LOWER(TRIM()) key with XMATCH and FILTER the original rows, which keeps the first spelling as typed, or use UNIQUE(LOWER(range)) inside ARRAYFORMULA if a lowercased result is fine.

Does Remove duplicates ignore extra spaces?

No. Google’s help says values that differ in letter case, formatting or formulas count as duplicates, but a trailing space still makes two values different. Run Data › Data cleanup › Trim whitespace on the column first; it does not remove non-breaking spaces.

Why do UNIQUE and Remove duplicates give different counts?

Usually for one of three reasons: Remove duplicates ignores letter case and UNIQUE doesn’t; Remove duplicates compares only the columns you tick while UNIQUE compares every column of the range; or an open range like A2:A makes UNIQUE return one extra blank row.

How do I use UNIQUE on one column but keep the whole row?

UNIQUE always compares every column you give it. To keep one row per email with all its columns, use FILTER with an XMATCH key: =ARRAYFORMULA(LET(d, Signups!A2:C, k, LOWER(TRIM(Signups!A2:A)), FILTER(d, k<>"", XMATCH(k, k)=SEQUENCE(ROWS(k))))). It keeps the first row of each email, like Remove duplicates.

How do I make UNIQUE results static?

Select the result, copy it, and use Edit › Paste special › Values only, ideally on a new tab. After that the list no longer updates when the source changes.

Can I undo Remove duplicates?

Right away, yes: Edit › Undo (Ctrl+Z, or ⌘+Z on a Mac). Later, use File › Version history. Duplicating the tab before you run it is the simplest safety net.

Want both: a preview first, then a one-click cleanup? SheetDupes (disclosure: we make it) is a Google Sheets add-on that finds, highlights and removes duplicates from a sidebar. Pick the columns that define a duplicate, preview the matching groups with their counts, highlight the extra rows without changing any values, and only then remove them or merge each group into one row. It copies a backup tab before it removes or merges anything, ignores extra spaces and, optionally, letter case and punctuation. Preview and Highlight are free on any size sheet; there is a 14-day free trial with no credit card, and writes remain free after the trial on sheets with up to 2,000 data rows during launch (through Jan 31, 2027; 500 after that). It only reads and writes the spreadsheet you have open, and your data is not sent to Loomwise. It is live on the Google Workspace Marketplace.
Install free from Google Workspace MarketplaceSee SheetDupes
Want to test it first? Try it on sample data (makes a copy of a 12-row example sheet in your Drive).

Related guides