Google Sheets Search for Duplicates: 4 Easy Ways

How-to basics · Updated November 23, 2026

Yes, you can search for duplicates in Google Sheets using built-in functions like COUNTIF, UNIQUE, and FILTER, or with conditional formatting to highlight them visually. The fastest method for most users is to apply conditional formatting to a range, which instantly colors duplicate entries without altering your data.

Why Duplicates Are a Common Problem

Duplicate data sneaks into spreadsheets through copy-paste errors, merged lists, manual entry, or imported data from multiple sources. A single duplicate can skew totals, misdirect mail merges, or cause a VLOOKUP to return the wrong value. Understanding how to find and remove duplicates is a core spreadsheet skill, and Google Sheets offers several approaches depending on whether you want to see, count, or delete them.

Method 1: Conditional Formatting to Highlight Duplicates

This is the visual approach—it colors duplicate cells so you can spot them at a glance.

  1. Select the range you want to check (e.g., A2:A100).
  2. Click Format > Conditional formatting.
  3. Under “Format cells if,” choose Custom formula is.
  4. Enter: =COUNTIF($A$2:$A$100, A2)>1 (adjust the range to match your selection).
  5. Set a formatting style (e.g., yellow fill) and click Done.

This formula counts how many times each cell’s value appears in the entire range. If the count is greater than 1, the cell gets highlighted. The dollar signs ($) lock the range so the formula applies correctly to each row. On Excel for Windows, the path is Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values, which is simpler but less flexible.

Method 2: Using COUNTIF to Count Occurrences

If you need a numeric count of how many times each value appears, add a helper column.

Assume your data is in A2:A20. In cell B2, enter:

=COUNTIF($A$2:$A$20, A2)

Drag the fill handle down to copy the formula. Cells showing a number greater than 1 indicate duplicates. For example, if “apple” appears in A2, A5, and A9, the formula returns 3 for each of those rows. This method is useful when you want to filter by count later.

Method 3: UNIQUE to Extract a De-duplicated List

Instead of marking duplicates, you can generate a clean list of unique values. The UNIQUE function does this in one step.

In cell D1, enter:

=UNIQUE(A2:A20)

This spills a list of all distinct values from A2:A20 into column D, removing duplicates automatically. If your data has headers, include them in the range or use =UNIQUE(A1:A20) and ignore the first row. This is a non-destructive way to create a reference list for dropdowns or further analysis.

Method 4: FILTER + COUNTIF to List Only Duplicates

To see a list of only the duplicated values (not the originals), combine FILTER with COUNTIF.

In cell F1, enter:

=UNIQUE(FILTER(A2:A20, COUNTIF(A2:A20, A2:A20)>1))

This works by first using COUNTIF to create an array of counts for each cell, then FILTER keeps only rows where the count is greater than 1, and UNIQUE removes repeated values from that filtered list. The result is a compact list of every value that appears more than once. Note that UNIQUE, FILTER, and dynamic arrays are available in Google Sheets and Excel 365, but not in older Excel versions.

Removing Duplicates Permanently

If you want to delete duplicate rows entirely, Google Sheets has a built-in tool.

  1. Select the data range (including headers).
  2. Click Data > Data cleanup > Remove duplicates.
  3. Choose which columns to check (if you select multiple, a row is removed only when all selected columns match).
  4. Click Remove duplicates.

This permanently deletes rows, so it’s wise to make a copy of your sheet first (right-click the sheet tab > Duplicate). Excel’s equivalent is Data > Remove Duplicates.

Comparing Google Sheets and Excel for Duplicate Detection

Both tools have similar capabilities, but the interfaces differ. Google Sheets relies on formulas and conditional formatting for most tasks, while Excel offers a dedicated “Duplicate Values” quick rule. Excel’s Remove Duplicates dialog is more flexible for selecting multiple columns. Google Sheets’ dynamic array functions (UNIQUE, FILTER) are just as powerful, but Excel users may need to press Ctrl+Shift+Enter for array formulas in older versions (Excel 365 handles them automatically). For large datasets (tens of thousands of rows), both perform adequately, but Excel may be faster on very large files.

Common Pitfalls and Misconceptions

  • Case sensitivity: Both COUNTIF and UNIQUE are case-insensitive by default. “Apple” and “apple” are treated as the same. If you need case-sensitive matching, you’d need a more complex formula using EXACT.
  • Leading/trailing spaces: “apple ” and “apple” are considered different. Use =TRIM(A2) in a helper column to normalize.
  • Blank cells: COUNTIF counts empty cells as duplicates if your range includes blanks. To ignore blanks, use =IF(A2="","",COUNTIF($A$2:$A$20,A2)).
  • Whole rows vs. single columns: Conditional formatting only checks the selected range. To find rows where multiple columns match, you need a different formula like =COUNTIFS($A$2:$A$20,$A2,$B$2:$B$20,$B2)>1.

Frequently Asked Questions

How do I highlight duplicates in Google Sheets without deleting them?
Use conditional formatting as described in Method 1. It’s non-destructive and updates automatically when you add new data.

Can I find duplicates across multiple columns at once?
Yes. Use COUNTIFS instead of COUNTIF. For example, to check columns A and B together, use =COUNTIFS($A$2:$A$20,$A2,$B$2:$B$20,$B2)>1 in conditional formatting.

Why does my COUNTIF formula return 0 for a value I know is there?
Check for invisible characters like spaces, or that the cell format isn’t text. Use =TRIM(A2) to clean, or ensure the range in the formula matches your data exactly.

Is there a way to find duplicates in Google Sheets on mobile?
The Google Sheets mobile app supports conditional formatting and formulas, but the interface is limited. You can apply the same formulas on the web version, then view the highlights on mobile.

What is the fastest method for a list of 10,000 rows?
Use UNIQUE to create a de-duplicated list, or use Remove duplicates if you want to delete. Conditional formatting on 10,000 rows may slow down the sheet, so consider using a formula-based approach instead.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.