Spreadsheet cleanup6 min read

How to remove duplicates in Google Sheets

To remove duplicates in Google Sheets, select the range, go to Data > Data cleanup > Remove duplicates, choose the columns to compare and click Remove duplicates. Sheets keeps the first row of each set.

By Operelio team · Updated October 8, 2026

On this page8
  1. 1.Three ways to find and remove duplicates
  2. 2.How to remove duplicates with Data cleanup
  3. 3.How to remove duplicates with the UNIQUE function
  4. 4.How to highlight duplicates before deleting them
  5. 5.How to remove duplicates in one column
  6. 6.Why Sheets misses some duplicates
  7. 7.Remove duplicates across files, or by email, with Deduplicate
  8. 8.Frequently asked questions

Three ways to find and remove duplicates

Remove duplicates is the quickest, but it deletes rows in place. The other two leave your data alone.

MethodUse it forChanges your data
Conditional formattingSeeing the duplicates before you delete anythingNo, it only highlights
Data cleanup > Remove duplicatesA one-off cleanup of a listYes, it deletes rows
UNIQUE functionA duplicate-free copy that updates when the list changesNo, it writes a new list

How to remove duplicates with Data cleanup

Remove duplicates deletes the duplicate rows from the sheet immediately, so highlight them first if you want to see what goes (further down).

1

Select the whole range

Select every column of your list, headers included, not only the column with the duplicates. Sheets only works on the cells you select, so a single column selected on its own loses cells from that column while the rest of each row stays put, and the rows no longer line up. If you do start from one column, the dialog offers an Expand button (such as Expand to A:D): click it.

Google Sheets' Remove duplicates dialog with only column B selected: 1000 rows and 1 columns selected, an Expand to A:D button, Data has header row unticked, and Column B ticked under Columns to analyse.
2

Open Remove duplicates

Go to Data > Data cleanup > Remove duplicates. On a UK English account the menu is called Data clean-up.

3

Check Data has header row

It starts unchecked. If the first row is headers, check Data has header row. Sheets then shows your column names in the list and leaves the header row out of the comparison.

Google Sheets' Remove duplicates dialog: 121 rows and 4 columns selected, Data has header row checked, and every column checked under Columns to analyse.
With Data has header row checked, the list shows the column names. Here every column is checked, so only rows that match in all four count.
4

Choose the columns to analyze

Check only the columns that define a duplicate. With Select all checked, two rows count as duplicates only when every cell matches, so one different phone number keeps both. For a contact list, Email on its own is usually what you mean.

5

Click Remove duplicates

Sheets deletes the duplicate rows and tells you how many it found and removed and how many unique rows remain. If the number is far off what you expected, undo with Edit > Undo, or Ctrl+Z (Cmd+Z on a Mac) once the message has closed, and look at which columns you checked.

The message after Remove duplicates: 2 duplicate rows found and removed. 118 unique rows remain.

How to remove duplicates with the UNIQUE function

UNIQUE leaves your original list alone and writes a copy without the duplicates somewhere else. Click an empty cell with enough room below and to the right of it, and type the formula.

For whole rows, give it every column: =UNIQUE(A2:D) returns each distinct row once. An open range like A2:D also returns one empty row at the end, from the blank rows below your data. For one column, give it that column: =UNIQUE(B2:B) returns the list of distinct values in column B, which is how you get a clean list of companies or countries from a long sheet.

The result updates when the original changes. To keep it as a fixed list, select the result, copy it, and paste it back with Edit > Paste special > Values only.

UNIQUE counts letter case, unlike Remove duplicates: Jane@example.com and jane@example.com both stay. It also compares whole rows, so it can't remove duplicates by email while keeping the rest of each row, because two rows with the same email and a different phone number are different rows to it. For that, use Data cleanup with only the Email column checked.

How to highlight duplicates before deleting them

Conditional formatting colors every value that appears more than once, so you can look before anything is deleted. This example checks emails in column B, starting at row 2.

1

Select the column

Select B2:B, the emails without the header.

2

Open conditional formatting

Go to Format > Conditional formatting. The rules panel opens on the right with your range filled in.

3

Use a custom formula

Under Format rules, set Format cells if to Custom formula is, and enter =COUNTIF($B$2:$B,B2)>1. COUNTIF counts how often each email appears in the column, ignoring letter case, and the rule colors the ones that appear more than once.

4

Pick a color and click Done

Every repeated email is now filled in. Sort or filter by color to look through them, then remove the duplicates with Data cleanup.

Rows 66 to 79 of a sign-up list with the COUNTIF rule applied: the emails in column B that appear more than once are filled green.

To color the whole row instead of only the email, select A2:D (all your columns) in the first step and use =COUNTIF($B$2:$B,$B2)>1. The $ before the second B keeps every cell in the row checking the email column.

How to remove duplicates in one column

There are two different jobs here, and Data cleanup does both depending on what you select.

To remove rows that share a value in one column, such as the same email, select the whole list and check only that column under Columns to analyze. Sheets compares that one column and deletes the whole row for each duplicate.

To get a clean list of the values in one column, such as every company once, use =UNIQUE(B2:B) in an empty column or on a new tab. The original column and the rest of the sheet stay as they are.

Selecting one column on its own and running Remove duplicates on it is the one to avoid when the column is part of a list. The dialog offers to expand the selection to the whole list; if you go ahead without it, Sheets deletes cells from that column only, the cells below move up, and from then on each value sits next to someone else's row.

Rows 106 to 110 after Remove duplicates ran on column B on its own: row 110 has Hannah Juarez next to an email that starts rosalind_yeboah.
Run on column B alone, the emails moved up, and Hannah Juarez now sits next to someone else's email.

Why Sheets misses some duplicates

Remove duplicates looks for identical values, ignoring letter case, so WESTMARCH and Westmarch count as the same. Anything else that differs keeps both rows:

What it missesExampleWhat to do in Sheets
Extra spacesjane@example.com with a space at the endRun Data > Data cleanup > Trim whitespace on the column first. It leaves non-breaking spaces, which come in with text copied from web pages. A CSV brought in with File > Import, with Convert text to numbers, dates, and formulas checked, has its spaces at the ends trimmed already.
Spelling and typosJon Smith and John Smith, or Westmarch Ltd and Westmarch LimitedNothing built in. You find them by eye, sorted by name.
The same person with two emailsjane@westmarch.com and jane.doe@westmarch.comCheck more columns, such as first name, last name and company, and check what comes up before you delete.
Duplicates in two filesThe same lead in this week's list and last week'sCopy both lists into one tab, one under the other with one header row, then remove duplicates.

If the list is going into HubSpot, its import matches existing contacts by email. Duplicates that share an email update one contact, but the same person under two emails becomes two contacts, so the same person under two emails is the duplicate to look for before a CRM import.

Remove duplicates across files, or by email, with Deduplicate

Operelio's Deduplicate does the job on the file itself, without a sheet open. Upload a CSV or Excel file (download it from Sheets with File > Download), pick the columns that define a duplicate, and check the preview, which shows your own rows grouped as duplicates before anything is removed. You choose whether the first or the last row of each group stays.

It also catches what Sheets misses. It ignores case and trims spaces by default. Smart matching treats emails, phone numbers and company names that mean the same thing as the same, such as Westmarch Ltd and Westmarch, Ltd., or +1 (415) 555-0123 and 415-555-0123. Similarity matching catches typos like Jon and John. The rows it removes come back as a separate file you can check, and your original file is never changed.

For duplicates spread across several files, combine them first with Merge Files, then run Deduplicate on the result.

Remove the duplicates Sheets misses, and choose which row in each group to keep.

Open Deduplicate

Frequently asked questions

How do I remove duplicates in Google Sheets?

Select the whole list, go to Data > Data cleanup > Remove duplicates, check Data has header row if you have headers, check the columns that define a duplicate, and click Remove duplicates. Sheets deletes the repeats and keeps the first row of each set.

Does Remove duplicates delete the whole row?

Yes, when you select the whole list. It compares the columns you check and deletes every cell of each duplicate row in your selection. If you select only one column, it deletes cells from that column only, which misaligns the rest of the sheet.

Can I undo removing duplicates in Google Sheets?

Yes. Press Ctrl+Z (Cmd+Z on a Mac) right after. Later on, go to File > Version history > See version history, open a version from before the change, and restore it or copy the rows you need back.

How do I keep the first or last duplicate?

Sheets always keeps the first row of each set, so sort the list before you remove duplicates to put the row you want first. To keep the most recent row, sort by a date column newest first with Data > Sort range. Operelio's Deduplicate lets you choose first or last directly.

Ready to get started?

Upload a file and run your first transformation. Free, no credit card required.