TechBuzzPro

Remove Duplicates in Google Sheets: Step-by-Step

· 6 min read · Apps & Browsers

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

Duplicate data can quietly skew your totals, mess up mail merges, and make your spreadsheet harder to trust. This guide shows you the fastest ways to find and remove duplicates in Google Sheets, whether you want to clean a single column or an entire table of data. You'll learn the built-in Remove Duplicates tool, a formula-based method for more control, and how to avoid accidentally deleting important rows.

What You'll Need

  • A Google Sheets spreadsheet with the data you want to clean.
  • Edit access to the sheet (you need to be able to modify the data).
  • If your data has a header row, make sure it's clearly labeled – you'll need to tell Sheets whether to treat it as a header.

Step-by-Step

Method 1: Using the Built-in Remove Duplicates Tool (Easiest)

  1. Select your data. Click the letter at the top of a column to select the whole column, or click and drag to select a specific range of cells. If your data is a contiguous block (no empty rows or columns), you can click any cell inside it and Sheets will usually detect the full range.
  2. Open the menu. Go to Data in the top menu bar, then click Data cleanup, and then click Remove duplicates.
  3. Choose your range. A dialog box will appear. Make sure the range shown is correct. If you selected a single cell, Sheets will try to guess the range – check it carefully.
  4. Decide about headers. Check the box that says Data has header row if your first row contains column titles. This prevents the header from being treated as a duplicate and deleted.
  5. Select the columns to check. By default, all columns are checked. This means a row is only removed if every cell in it matches another row exactly. If you only want to remove duplicates based on one column (like email addresses), uncheck the other columns.
  6. Click Remove duplicates. Sheets will analyze the data and show you a summary, for example: "Removed 12 duplicate rows. 88 unique rows remain."
  7. Review the result. The duplicates are gone. The first occurrence of each unique row is kept; the later ones are deleted.

Method 2: Using a Formula to Identify Duplicates (More Control)

If you want to see which rows are duplicates before deleting them, use a helper column with a formula.

  1. Add a helper column. In the first empty column to the right of your data (say column C if your data is in A and B), type a header like "Duplicate?" in the first row.
  2. Enter the formula. In the cell below the header (C2), type the following formula: =COUNTIF($A$2:$A$100, A2) > 1 – adjust the range to match your data. This counts how many times the value in A2 appears in the range. If it appears more than once, it returns TRUE.
  3. Copy the formula down. Click the small blue square in the corner of cell C2 and drag it down to cover all rows with data. Every row that is a duplicate (has a matching row above it) will show TRUE.
  4. Filter for TRUE. Click the filter icon (funnel) in the header of your helper column, uncheck FALSE, and click OK. Now you only see the duplicate rows.
  5. Delete those rows. Select all visible rows (click the row numbers on the left), right-click, and choose Delete selected rows.
  6. Turn off the filter. Click the filter icon again and choose Select all to show all remaining data. You can now delete the helper column.

Method 3: Using the UNIQUE Function (Creates a New List)

This method doesn't delete anything; it creates a new list of unique values elsewhere.

  1. Click an empty cell where you want the unique list to start (e.g., E1).
  2. Type the formula: =UNIQUE(A2:B100) – replace the range with your data. This will spill the unique rows into the cells below and to the right.
  3. Review the output. The new list contains only unique rows. You can copy it and paste as values if you want to replace the original data.

Common Mistakes

  • Forgetting the header row. If you don't check "Data has header row," your column titles might be deleted as duplicates.
  • Selecting too many columns. If you check all columns but only want to dedupe by email, you'll keep rows that have the same email but different names – which is probably not what you want.
  • Not checking for leading/trailing spaces. "john@email.com" and "john@email.com " look the same to you but are different to Sheets. Use =TRIM(A2) in a helper column first.
  • Deleting rows manually without sorting. If you sort data before deleting, you might accidentally delete the wrong occurrence.
  • Assuming the first occurrence is the one you want. The built-in tool keeps the first row and deletes later ones. If your data isn't sorted, the "first" row might not be the most recent or most complete.

Tips

  • Always make a backup. Before removing duplicates, duplicate the sheet (right-click the tab → Duplicate) so you can recover if something goes wrong.
  • Use conditional formatting to preview. Select your data, go to Format → Conditional formatting, and use the custom formula =COUNTIF($A$2:$A2, A2) > 1 to highlight duplicates in real time.
  • For large datasets, use the built-in tool. It's much faster than formulas for thousands of rows.
  • Combine with SORT. Sort your data by a date column before removing duplicates to keep the most recent record.
  • Use UNIQUE for a quick check. If you just need a list of unique values without altering your original data, UNIQUE is the safest option.

Troubleshooting

  • The Remove duplicates option is grayed out. This usually means you have selected a range that includes merged cells or the sheet is protected. Unmerge cells or check if the sheet is protected (Data → Protect sheets and ranges).
  • It says "No duplicates found" but you know there are. Check for invisible characters like spaces. Use =TRIM(A2) and =CLEAN(A2) to remove them, then try again.
  • It removed too many rows. You likely selected all columns when you only wanted to dedupe by one. Undo (Ctrl+Z) and redo with only the relevant columns checked.
  • The UNIQUE formula shows #REF! error. This means there isn't enough space for the output. Delete any data in the cells below or to the right of the formula.
  • Duplicates still appear after using the tool. Your data may have different data types (e.g., one cell is text "123" and another is number 123). Use the formula method with =COUNTIF(ARRAYFORMULA(A2:A100 & ""), A2 & "") > 1 to treat everything as text.

Frequently Asked Questions

Does Google Sheets have a built-in remove duplicates feature?

Yes. Select your data, go to Data → Data cleanup → Remove duplicates. It's the quickest method.

Can I remove duplicates based on one column only?

Yes. In the Remove duplicates dialog, uncheck all columns except the one you want to base the duplicate check on. Rows will only be removed if that column's value repeats.

Will removing duplicates delete my header row?

Only if you don't check the "Data has header row" option. Always check it if your data has headers.

How do I keep the last occurrence instead of the first?

The built-in tool always keeps the first. To keep the last, sort your data in reverse order (e.g., newest first) before removing duplicates, or use a formula with a helper column that marks duplicates from the bottom up.

What's the difference between Remove duplicates and UNIQUE?

Remove duplicates deletes rows from your existing data. UNIQUE creates a new list of unique values elsewhere, leaving your original data untouched.

Can I undo removing duplicates?

Yes, immediately after the action, press Ctrl+Z (Cmd+Z on Mac) to undo. If you've made other changes since, you can't undo, so a backup is safer.