Google Sheets: Find & Highlight Duplicates in a Column

How-to basics · Updated November 23, 2026

Yes, Google Sheets can show duplicates in a column, and the fastest way is to use conditional formatting with the COUNTIF function. Select your column, go to Format > Conditional formatting, choose “Custom formula is,” enter =COUNTIF(A:A, A1)>1 (adjusting the range), and set a highlight color — every repeated value will be colored instantly. For a permanent list of the duplicate values themselves, use =UNIQUE(FILTER(A:A, COUNTIF(A:A, A:A)>1)) in a blank cell.

Why Finding Duplicates in Google Sheets Is Tricky

Google Sheets does not have a single button labeled “Find Duplicates” like some dedicated data-cleaning tools. Instead, you combine built-in functions and formatting rules. The core challenge is that “duplicate” can mean two different things: exact duplicates (same text, same case, same spacing) or near-duplicates (e.g., “John Smith” vs. “john smith”). Conditional formatting with COUNTIF catches exact matches only. If your data has inconsistent capitalization, extra spaces, or trailing characters, you will need to clean it first — for example, wrap the range in TRIM and LOWER inside the formula to normalize it.

Method 1: Highlight Duplicates with Conditional Formatting

This is the most common approach because it visually marks duplicates without altering your data. Here are the exact steps for Google Sheets in a web browser:

  1. Select the column range, say A2:A100 (include the header row if you want it excluded, start at A2).
  2. Click Format > Conditional formatting.
  3. Under “Apply to range,” confirm it shows A2:A100.
  4. Under “Format rules,” open the dropdown and choose Custom formula is.
  5. Enter =COUNTIF(A$2:A$100, A2)>1 — the dollar signs lock the range so the formula works correctly for each row.
  6. Pick a fill color (e.g., yellow) and click Done.

Every cell whose value appears more than once in that range will turn yellow. If you want to highlight only the second and later occurrences (not the first), use =COUNTIF(A$2:A2, A2)>1 — this counts only up to the current row, so the first instance stays uncolored.

Method 2: Extract a List of Duplicate Values

Conditional formatting shows you where duplicates are, but sometimes you need a clean list of the duplicated values themselves. Use this formula in a blank cell (say C1):

Assuming your data is in A2:A100, enter:

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

This works by: COUNTIF(A2:A100, A2:A100) returns an array of counts for each row; FILTER keeps only rows where the count is greater than 1; UNIQUE removes repeated entries from that filtered list. The result is a vertical list of each distinct duplicate value. For example, if column A contains “apple,” “banana,” “apple,” “cherry,” “banana,” the formula returns “apple” and “banana” in cells C1 and C2.

Method 3: Remove Duplicates Permanently

If you want to delete duplicates rather than just see them, Google Sheets has a built-in menu command: Data > Data cleanup > Remove duplicates. Select the range first, then run it. A dialog box will ask whether your data has a header row and which columns to check. It keeps the first occurrence and deletes the rest. This is destructive — it permanently removes rows — so save a copy of your sheet before using it. There is no undo after closing the dialog, though Ctrl+Z (Cmd+Z on Mac) will work immediately after if you haven’t done anything else.

Common Problems and Fixes

  • Formula not highlighting anything: Check that the range in the formula matches the “Apply to range” — if you applied to A2:A100 but wrote A:A, the relative reference breaks. Also ensure no leading/trailing spaces; use =TRIM(A2) in a helper column to check.
  • Highlighting blank cells: Blank cells are counted as duplicates because every blank matches every other blank. Add a condition to exclude blanks: =AND(A2<>"", COUNTIF(A$2:A$100, A2)>1).
  • Case sensitivity: COUNTIF is case-insensitive by default in Google Sheets, so “Apple” and “apple” are treated as the same. If you need case-sensitive matching, use =SUMPRODUCT(--EXACT(A$2:A$100, A2))>1 instead.
  • Duplicate pairs across two columns: To find duplicates across two columns (e.g., same first and last name in separate columns), combine them: use a helper column with =A2&" "&B2, then run conditional formatting on that helper column.

Google Sheets vs. Excel: Key Differences

Excel has a dedicated Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values option that works without a formula. Google Sheets lacks this one-click preset; you must use the custom formula method. Also, Excel’s COUNTIF works the same way, but the range locking syntax and the menu paths differ. In Excel, the equivalent duplicate-extraction formula would be =UNIQUE(FILTER(A2:A100, COUNTIF(A2:A100, A2:A100)>1)) — the same syntax, but UNIQUE and FILTER require Excel 2021 or Microsoft 365. In Google Sheets, these functions are available to all users for free.

Performance with Large Datasets

Conditional formatting with COUNTIF works fine up to about 10,000 rows. Beyond that, the sheet may slow down because every cell in the range triggers a full-range count. For very large columns (50,000+ rows), consider using a helper column with =COUNTIF(A:A, A2) dragged down, then filter on that column for values greater than 1. Alternatively, use QUERY: =QUERY(A2:A, "select A, count(A) where A is not null group by A having count(A) > 1 label count(A) ''") — this returns both the duplicate value and its count, and it processes faster than per-cell formulas.

Frequently Asked Questions

How do I find duplicates in a column but keep the first occurrence?

Use conditional formatting with the formula =COUNTIF(A$2:A2, A2)>1 applied to A2:A100. This counts only from the top of the range to the current row, so the first time a value appears it shows a count of 1 (no highlight), and every subsequent occurrence shows a count greater than 1 and gets highlighted. This is the standard way to visually mark only the later duplicates.

Can I highlight duplicates across multiple columns at once?

Yes, but you need to define what “duplicate” means. If you want to find rows where the entire row is identical, select the whole range (e.g., A2:C100) and use the custom formula =COUNTIF(ARRAYFORMULA(A$2:A$100&"|"&B$2:B$100&"|"&C$2:C$100), A2&"|"&B2&"|"&C2)>1. This concatenates the columns into a single key. If you only need duplicates in one column while ignoring others, just apply the formula to that single column.

Why does my conditional formatting highlight the header row?

Because your range includes the header. If your data starts at row 2, apply the rule to A2:A100 and write the formula starting at A2. If your header text happens to match a data value, it will be highlighted. Always exclude the header from the “Apply to range” field.

Is there a way to count how many duplicates exist?

Yes. Use =COUNTA(A2:A100)-COUNTA(UNIQUE(A2:A100)) to get the number of duplicate cells (extra occurrences beyond the first). For the number of distinct duplicate values, wrap the earlier formula: =COUNTA(UNIQUE(FILTER(A2:A100, COUNTIF(A2:A100, A2:A100)>1))). Remember that blank cells are counted as duplicates unless you filter them out with FILTER(A2:A100, A2:A100<>"").

Does Google Sheets have a built-in duplicate finder?

Not a dedicated one-click tool like Excel’s “Duplicate Values” preset. However, Data > Data cleanup > Remove duplicates is built-in and will delete duplicates, but it does not highlight them. For highlighting, the conditional formatting custom formula is the standard method. There are also add-ons like “Remove Duplicates” in the Google Workspace Marketplace, but the built-in functions are sufficient for most cases.

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.