Ai for Sheets.
Duplicate rows are the most common data problem in spreadsheets. Two entries for the same customer, three copies of an order, a contact list pasted from multiple sources — all of it clutters reports and skews totals.
Google Sheets has five solid ways to find duplicates, each suited to a different situation. This guide walks through all of them, plus the harder problem most articles ignore: what to do about "fuzzy" duplicates where the rows aren't exactly identical (John Smith vs john smith vs J. Smith).
The fastest method for most cases:
=COUNTIF(A:A, A1)>1 (replace A with your column)Every duplicate value in the column is now highlighted. Read on for the other four methods and when to use each.
The most common technique. It works without changing your data — useful when you want to see duplicates but decide manually what to do about them.
=COUNTIF($A$2:$A$1000, A2)>1
Every cell that appears more than once is highlighted. Sort by colour to bring duplicates together.
Across multiple columns (e.g., first and last name):
=COUNTIFS($A$2:$A$1000, $A2, $B$2:$B$1000, $B2)>1
Only second-and-later occurrences (keep the first as "original"):
=COUNTIF($A$2:A2, A2)>1
The changed reference — $A$2:A2 is a growing range, so the count is 1 the first time the value appears and goes up only on later rows.
Highlight unique values instead:
=COUNTIF($A$2:$A$1000, A2)=1
If you want a new column containing only the unique values — duplicates stripped out automatically — use UNIQUE.
In an empty cell:
=UNIQUE(A2:A1000)
Returns every distinct value, one per row, in the order they first appeared.
=UNIQUE(A2:C1000) <!-- Unique combinations across multiple columns -->
=SORT(UNIQUE(A2:A1000)) <!-- Sorted alphabetically -->
=UNIQUE(FILTER(A2:A1000, A2:A1000<>"")) <!-- Ignoring blanks -->
UNIQUE doesn't change your original data — it creates a separate clean list.
Sometimes you need to know how many times each value appears, not just whether it's duplicated. In a new column next to your data:
=COUNTIF($A$2:$A$1000, A2)
Drag down. You'll see a count for every row: 1 for unique entries, 2 or higher for duplicates.
Useful when reporting on "how many customers placed more than one order", figuring out which duplicates appear most, or sorting by count to see the worst offenders.
For multi-column matching, use COUNTIFS:
=COUNTIFS($A$2:$A$1000, A2, $B$2:$B$1000, B2)
Sheets has a one-click option to delete duplicate rows. Use this only when you're certain you want the data gone — it modifies your sheet directly.
Sheets reports how many rows were removed.
To look at just the duplicate rows without scrolling through the whole sheet — combine COUNTIF with a filter view.
=COUNTIF($A$2:$A$1000, A2)>1
You're now looking at only the duplicate rows. Sort them, review them, or copy them to another sheet for cleanup.
Every method above finds exact matches. Real-world data rarely cooperates:
John Smith vs john smith vs John Smith vs Smith, Johnacme@gmail.com vs Acme@Gmail.com(555) 123-4567 vs 5551234567 vs 555-123-4567Acme Corp vs Acme Corporation vs ACME CORP.Built-in tools see these as different values. You need to normalize first.
Add a helper column that strips the formatting noise:
Lowercase and trim spaces:
=LOWER(TRIM(A2))
Strip non-numeric characters (good for phone numbers):
=REGEXREPLACE(A2, "[^0-9]", "")
Remove common business suffixes:
=TRIM(REGEXREPLACE(LOWER(A2), " (inc|corp|llc|ltd|co|corporation)\.?$", ""))
Then run COUNTIF on the helper column instead of the raw one.
For names with minor spelling variations, try stripping vowels to compare consonant skeletons:
=SUBSTITUTE(REGEXREPLACE(LOWER(A2), "[aeiou\.]", ""), " ", "")
This also removes periods and spaces, so values like J. Smith and J.Smith normalize to the same skeleton.
This is where built-in formulas hit a wall. Genuinely fuzzy matching — recognising that J. Smith — Acme Corp and John Smith at Acme are probably the same person — requires understanding meaning, not just string manipulation.
A workable approach: normalize aggressively with the methods above, deal with the obvious duplicates first, then manually review the suspicious leftovers.
Forgetting to anchor your range. A formula like =COUNTIF(A2:A1000, A2) shifts as you drag down, giving wrong counts. Always use =COUNTIF($A$2:$A$1000, A2) — the dollar signs lock the range.
Including the header row. If your data has headers, start at row 2 (A2:A1000), not row 1. Otherwise the header value gets counted with the data.
Applying "Remove duplicates" without a backup. Make a copy of your sheet first. Once rows are deleted there's no undo beyond version history.
Assuming duplicates are always bad. Some datasets intentionally have repeated values (a customer who placed three orders should appear three times in the orders table). Only remove duplicates you've confirmed are errors.
Use conditional formatting with =COUNTIF(A:A, A1)>1. It highlights every repeated value without deleting any rows.
No. The built-in remove-duplicates tool only catches exact matches. For fuzzy duplicates, normalize values first (for example with LOWER, TRIM, and REGEXREPLACE) and then compare helper columns.
Use formulas when you need to review matches before deleting. Use Remove duplicates only when you're sure duplicate rows are safe to remove.
Paste it into Apps Script, add your OpenAI API key, then use the OpenAI menu in Google Sheets to run Generate Content on the selected cell.
Free API vs. paid side panel — step-by-step setup, real-world use cases, and which method fits your workflow.
May 23, 2026Write any formula in plain English. Free and paid options compared, with prompt patterns that get better results.
May 23, 20265 methods compared — Apps Script, add-ons, browser extensions, Zapier, and copy-paste. Honest pros and cons at every price point.
May 23, 20265 methods including conditional formatting, UNIQUE, COUNTIF, the built-in tool, and fuzzy matching for near-duplicates.
May 23, 2026