How to Find Duplicates in Google Sheets
To find duplicates in Google Sheets, color them with one conditional formatting rule built on COUNTIF. Below you'll also find whole rows, two columns and two tabs, formulas that list or count duplicates, and safe deletion. The last section covers the spaces, letter case and wildcards that stop a duplicate from showing up.
Last updated: November 2026
Quick Answer
Select your list (say A2:A1000), click Format > Conditional formatting, choose Custom formula is and enter =COUNTIF($A$2:$A$1000,A2)>1. Pick a color and click Done.
To delete the extra copies, use Data > Data cleanup > Remove duplicates. To get a clean list without touching the original, use =UNIQUE(A2:A1000).
Highlight Duplicates with Conditional Formatting
This is the fastest way to see every repeated value, and it changes nothing in your data. It uses the same formula pattern as Google's own conditional formatting help.
- Select the cells you want to check, for example A2:A1000. Start below your header row.
- Click Format > Conditional formatting. A panel opens on the right.
- Under Format cells if, choose Custom formula is.
- Type =COUNTIF($A$2:$A$1000,A2)>1 in the box.
- Under Formatting style, pick a fill color, then click Done.
$A$2:$A$1000 is the whole list, and the dollar signs lock it so every cell is checked against the same range. A2 has no dollar signs because it has to move: on row 3 Sheets checks A3, on row 4 it checks A4, and so on. If your list starts somewhere else, change both parts, and make sure the unlocked cell is the first cell you selected.Highlight only the extra copies
To leave the first appearance of each value plain and color only the repeats after it, use:
=COUNTIF($A$2:A2,A2)>1The range grows as it goes down the sheet ($A$2:A2, then $A$2:A3), so each cell is only compared with the cells above it. This is the one to use when you plan to delete the extras by hand and keep the first entry.
Highlight the whole row
Select every column of your table (for example A2:D1000) and use:
=COUNTIF($A$2:$A$1000,$A2)>1The dollar sign before the second A pins every cell in the row to column A, so the full row changes color. Google's help uses the same trick to color entire rows.
Find Duplicates in Two or More Columns
Decide what counts as a duplicate first. These three rules answer different questions:
| You want to | Select | Custom formula |
|---|---|---|
| Color any value that appears more than once anywhere in columns A to C | A2:C1000 | =COUNTIF($A$2:$C$1000,A2)>1 |
| Color rows where the same combination repeats, such as the same name and email | A2:D1000 | =COUNTIFS($A$2:$A$1000,$A2,$B$2:$B$1000,$B2)>1 |
| Color values in column A that also appear in column B | A2:A1000 | =COUNTIF($B$2:$B$1000,A2)>0 |
Gluing columns together with & and counting the result also works, but it can be fooled: "AB" next to "C" and "A" next to "BC" both become "ABC". COUNTIFS compares each column separately, so it can't mix them up.
Find Duplicates Between Two Tabs
Conditional formatting can't point straight at another tab, and Google's help says to use INDIRECT instead. On the first tab, select A2:A1000 and use:
=COUNTIF(INDIRECT("Sheet2!A2:A1000"),A2)>0That colors every entry that also appears in A2:A1000 on the tab named Sheet2. If the tab name has spaces, put single quotes around it inside the text:
=COUNTIF(INDIRECT("'Old list'!A2:A1000"),A2)>0One catch: INDIRECT reads the tab name as plain text, so renaming the tab breaks the rule. Update the name in the formula whenever you rename the tab.
Flag Duplicates in a Helper Column
Want something you can sort or filter by? Type this in B2, then select B2 down to your last row and press Ctrl + D (⌘ + D on a Mac) to fill it down:
=COUNTIF($A$2:$A$1000,A2)A 1 means the value is unique. Anything higher means it repeats, and the number is how many copies exist. Add >1 to the end if you would rather see TRUE or FALSE.
| A: Customer | B: Count | With >1 |
|---|---|---|
| Acme Ltd | 2 | TRUE |
| Brightside | 1 | FALSE |
| ACME LTD | 2 | TRUE |
| Corbel & Co | 1 | FALSE |
Acme Ltd and ACME LTD match even though one is in capitals, because COUNTIF is not case sensitive. More on that in the troubleshooting section.
Show only the duplicates
Click Data > Create a filter, open the filter menu on any column, choose Filter by condition > Custom formula is and enter =COUNTIF(A2:A1000,A2:A1000)>1. That's the duplicate version of the unique-values example in Google's filter help.
Already colored the duplicates with conditional formatting? Sort by color in the same filter menu to bring them all to the top. Google confirms conditional formatting colors work for this.
List Unique or Duplicate Values with Formulas
These formulas build a new list in an empty spot and leave the original alone. The syntax for UNIQUE, including its third argument, is in Google's UNIQUE help.
One copy of every value, in the order each first appears
=UNIQUE(A2:A1000)Only the values that appear exactly once
=UNIQUE(A2:A1000,FALSE,TRUE)One copy of each value that repeats
=UNIQUE(FILTER(A2:A1000,A2:A1000<>"",COUNTIF(A2:A1000,A2:A1000)>1))If nothing repeats, the last one shows #N/A, which is how FILTER says it found no matches.
Leave room below. The results spill down the column, so keep the cells under the formula empty. If something is in the way, Sheets shows a #REF! error instead of the list. Google also warns that trailing spaces and numbers formatted differently can stop matching values from merging.
Count Duplicates
How many times one value appears
=COUNTIF(A2:A1000,"Acme Ltd")How many cells hold a repeated value (every copy counts)
=SUMPRODUCT((A2:A1000<>"")*(COUNTIF(A2:A1000,A2:A1000)>1))How many different values repeat
=IFERROR(ROWS(UNIQUE(FILTER(A2:A1000,A2:A1000<>"",COUNTIF(A2:A1000,A2:A1000)>1))),0)The A2:A1000<>"" parts skip empty rows, so the range can run past the end of your data without inflating the count.
To jump to each copy of one value instead, press Ctrl + F (⌘ + F on a Mac) and type it. Our guide to searching in Google Sheets covers Find and replace as well.
Remove Duplicates
Data cleanup deletes the extra copies for you, so highlight and check them first.
- Select the whole table, every column of it. Clicking a single cell inside it also works: Google says the tool then uses the whole range around that cell.
- Click Data > Data cleanup > Remove duplicates.
- Say whether the data has a header row, then tick only the columns that define a duplicate.
- Click Remove duplicates.
Sheets counts cells as duplicates when their values are identical, even if their letter case, formatting or formulas differ, according to Google's data cleanup help. So "ACME" and "acme" match, and so do a typed 10 and a formula that returns 10.
The columns you tick decide the result. Compare only an Email column, and two rows with the same email but different names are duplicates, so one of them goes.
Removed the wrong rows? Press Ctrl + Z (⌘ + Z on a Mac) straight away. If it's too late for that, click Last edit (the version history control) at the top right, choose an earlier version in the right panel, then click Restore this version and Restore. Google's version history help warns that restoring a spreadsheet erases the cell-by-cell edit history from before the restore, so make a copy instead if you need that history.
Troubleshooting
Two values look identical but don't match
Stray spaces are the usual cause. Google's TRIM help says Sheets trims text you type into cells by default, so extra spaces tend to arrive with pasted or imported data. Select the column and click Data > Data cleanup > Trim whitespace.
That tool leaves non-breaking spaces alone, the kind that often come along when you copy from a web page. For those, clean the text in a helper column first:
=TRIM(SUBSTITUTE(A2,CHAR(160)," "))Upper and lower case count as the same
COUNTIF ignores case, so "Acme" and "ACME" are duplicates, and Remove duplicates treats them the same way. If case matters, use this rule instead:
=AND(A2<>"",SUMPRODUCT(--EXACT($A$2:$A$1000,A2))>1)EXACT only matches identical characters, case included. The A2<>"" part stops empty cells from matching each other.
Codes with * or ? get flagged when they're unique
COUNTIF reads * and ? as wildcards. A part number like AB*12 is treated as a pattern, so it also matches AB12 and ABX12. The EXACT rule above compares characters literally, so use it for codes like these.
When you count one code by hand, put a tilde in front of the symbol: =COUNTIF(A2:A1000,"AB~*12") matches only AB*12. Google's COUNTIF help documents the tilde.
Empty cells get colored too
If blank cells under your list pick up the color, add a check that skips them:
=AND(A2<>"",COUNTIF($A$2:$A$1000,A2)>1)The color lands one row off
The unlocked cell in the formula has to be the first cell of the range in Apply to range. A rule applied to A2:A1000 that says A1 instead of A2 colors the cell below each duplicate.
Nothing changes color
Another rule may be winning. Sheets checks rules in order and the first one that's true sets the format, so drag your duplicate rule to the top of the list in the panel. Also check the formula starts with an equals sign.
Numbers that look the same don't merge
Google's UNIQUE help asks for numbers formatted the same way. Select the column and apply one format from Format > Number before you check.
Frequently Asked Questions
How do I find duplicates in Google Sheets?
Select your list, click Format > Conditional formatting, choose Custom formula is and enter =COUNTIF($A$2:$A$1000,A2)>1. Pick a color and click Done. Change A2:A1000 to match where your data is.
What is the formula to find duplicates in Google Sheets?
=COUNTIF($A$2:$A$1000,A2)>1 returns TRUE for every value that appears more than once in A2:A1000. Leave off the >1 and it returns how many times each value appears instead.
How do I highlight duplicates in two columns?
Select both columns and use =COUNTIF($A$2:$B$1000,A2)>1 to color a value that repeats anywhere in them. To color rows where the same pair repeats, such as the same name and email, use =COUNTIFS($A$2:$A$1000,$A2,$B$2:$B$1000,$B2)>1.
How do I remove duplicates in Google Sheets?
Select the whole table and click Data > Data cleanup > Remove duplicates. Say whether the data has a header row, tick the columns that define a duplicate and click Remove duplicates. It deletes data, so highlight and check the duplicates first.
How do I find duplicates without deleting them?
Highlight them with conditional formatting, count them in a helper column with COUNTIF, or list them somewhere empty with =UNIQUE(FILTER(A2:A1000,A2:A1000<>"",COUNTIF(A2:A1000,A2:A1000)>1)). None of these change your data.
Does Google Sheets treat upper and lower case as duplicates?
Yes. COUNTIF is not case sensitive, and Remove duplicates treats cells that differ only in letter case as duplicates. For a case-sensitive check, use a rule built on EXACT, which only matches identical characters.
How do I find duplicates between two sheets?
On the first tab, select A2:A1000 and add a conditional formatting rule with =COUNTIF(INDIRECT("Sheet2!A2:A1000"),A2)>0. You need INDIRECT because conditional formatting can't point at another tab directly.
Why isn't my duplicate formula working?
The usual causes are stray spaces in pasted data and a formula whose first cell does not match the first cell of the range. Another formatting rule can also take priority, and COUNTIF reads * and ? in your values as wildcards.
Show your team how, instead of telling them
Cleaning up a sheet your colleagues share? Record the fix once with Deckoholic's Chrome extension. It cuts the ums and pauses, adds zooms and captions, and exports an MP4 or a step-by-step help doc.
Try Deckoholic Free