New Tool Radar

AI for Data & Spreadsheets

How to Remove Duplicate Rows in Google Sheets With Data Cleanup

Use Data cleanup Remove duplicates in Google Sheets to delete repeated rows, keeping the first occurrence of each key.

Schematic with three steps: Highlight the repeats first; Run Remove duplicates; Check the count and undo if it.

Google Sheets has its own duplicate remover under Data, Data cleanup, Remove duplicates. It deletes repeated rows in place, so work on a copy of the sheet first and highlight the repeats before you remove anything.

What you need

  • Google Sheets with the table to clean
  • A decision on which columns define a duplicate
  • A duplicate copy of the tab, made with right-click, Duplicate

Step 1: Highlight the repeats first

Select the range, open Format, Conditional formatting, choose Custom formula is and enter =COUNTIF($B$2:$B$40,$B2)>1, adjusted to your key column. Colour every repeated row so you can read what will be removed.

Step 2: Run Remove duplicates

Select the data including its header, open Data, Data cleanup, Remove duplicates, tick Data has header row, choose the columns to compare and click Remove duplicates. Sheets keeps the first occurrence and deletes the later ones.

Step 3: Check the count and undo if it looks wrong

Compare the remaining row count with what you expected. If the header vanished, the Data has header row box was off; undo at once and re-run with it ticked.

Worked example: synthetic 40-row Sheets list

The table below is a synthetic example. It shows the expected result of removing duplicates in Sheets; no sheet was opened.

Check Count Result
Rows before 40 Source
Rows removed 5 Five repeat rows
Rows remaining 35 40 minus 5
Header row kept Yes Data has header row ticked

Expected result (UNTESTED). 5 of 40 rows are removed as duplicates, leaving 35 rows, and the header row is kept because Data has header row was ticked. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • Removal is permanent once the file is closed, so work on a duplicate tab first.
  • Cells with the same value but different case, formatting or formula still count as duplicates.
  • Use =UNIQUE(range) instead when you want a clean copy and need to keep the original.

Sources

See all