How to highlight duplicates in Google Sheets
Learn practical, step-by-step methods to highlight duplicates in Google Sheets using conditional formatting, formulas, and best practices for clean, error-free data.

You will learn how to highlight duplicate values in Google Sheets using built-in tools like conditional formatting and formulas. This quick answer previews the two reliable approaches, explains when to use each, and highlights common pitfalls to avoid, so you can quickly improve data quality without altering your original data.
Understanding duplicates in Google Sheets
Duplicates occur when the same value appears more than once within a range. In Google Sheets, duplicates can exist in a single column, in multiple columns, or across a dataset that was merged from different sources. According to How To Sheets, recognizing duplicates early helps maintain data integrity, prevents skewed analyses, and saves time in data cleaning. The three common scenarios are exact matches (identical text or numbers), numeric duplicates (same number in multiple rows), and text variations that look the same (for example, USA vs United States). To handle these, you need a reliable method that doesn’t alter your original data. The methods discussed here are designed to be non-destructive, meaning you can identify duplicates without deleting or modifying data unless you explicitly choose to do so.
How Google Sheets identifies duplicates
Google Sheets uses formulas, functions, and formatting rules to mark duplicates. The built-in functions COUNTIF, COUNTIFS, and MATCH are central to duplicate detection. COUNTIF(range, criterion) counts occurrences of a value in a range; if the count is greater than 1, it’s a duplicate. For multi-column checks, you can create a helper column that concatenates the relevant columns to form a unique key, then apply a single-column duplicate rule. When using conditional formatting to highlight duplicates, you define a custom formula or a rule like COUNTIF($A$2:$A$100, A2)>1 to apply formatting to all duplicates in that range. Always ensure headers are excluded or properly anchored so formatting doesn’t spill into header cells.
Method 1: Conditional formatting to highlight duplicates
Conditional formatting is often the fastest way to visually identify duplicates. Steps: 1) Select the target range (e.g., A2:A100). 2) Open Format > Conditional formatting. 3) Choose "Custom formula is" and enter =COUNTIF($A$2:$A$100, A2)>1. 4) Pick a highlight color and click Done. This rule automatically marks all duplicate values within the range, even as you add new data. If you want to apply across multiple columns, adjust the range to include all relevant cells and use a relative reference like =COUNTIF($A$2:$C$100, A2)>1 to check the first column, or create separate rules per column. For larger datasets, limit conditional formatting scope to the used data to maintain performance.
Method 2: Formula-based approach to flag duplicates
Sometimes you want to create a dedicated visual marker rather than pure formatting. A simple helper column can show a marker for repeated values. In the adjacent column, enter a formula that returns a marker when a duplicate is found, such as using COUNTIF to count occurrences and then return a marker. You can hide the helper column or use conditional formatting on this column too. For multi-column duplicates, create a key by concatenating columns (e.g., A2&"|"&B2) and apply COUNTIF on that key range. You can also use array formulas to process entire columns without dragging.
Handling duplicates across multiple columns
When duplicates need to be detected across more than one column, use a key that combines values from the relevant columns. Example: in a helper column, =A2&"-"&B2. Then use COUNTIF on the key column to flag duplicates. This approach ensures that duplicates are flagged when the pair (A,B) repeats, not just a single column value. If you only care about duplicates ignoring case, you can wrap the text in UPPER or LOWER within the key: =UPPER(A2)&"-"&UPPER(B2). Remember to anchor ranges with $ so the formula remains consistent as you fill down.
Cleaning, removing, and validating duplicates
After highlighting duplicates, you might need to remove or separate them. Use Data > Data cleanup > Find duplicates to remove duplicates while keeping one instance. If you want to preserve all entries but remove exact duplicates, apply a filter to show only rows marked as duplicates and then delete. Always validate results by reconciling counts with COUNTIF, ensuring no unique records were removed unintentionally. Back up your data before making mass changes.
Best practices and common pitfalls
Best practices: exclude header rows from your ranges; use dynamic named ranges if your data grows; test rules on a small sample before applying to full sheets; document the method in a worksheet so others understand the approach. Common pitfalls include using entire-column references (A:A) in large ranges, which can slow down sheets; mixing data types (numbers and text) without normalization; and failing to re-apply rules after data imports that shift rows. Also note that case sensitivity is not part of the default duplicate detection; use UPPER/LOWER if needed.
Practical verification checklist
Use this checklist: 1) Confirm headers are excluded, 2) Verify color appears on duplicates only, 3) Test with known duplicates added to check if formatting updates, 4) Check multi-column duplicates by adding new data to see if the key updates accordingly, 5) Ensure saved changes persist after closing and reopening the sheet.
Practical examples and templates
Here are ready-to-copy templates you can adapt: 1) Simple single-column: formula =COUNTIF($A$2:$A$100, A2)>1. 2) Multi-column: create a key with =A2&"|"&B2 and apply counts on the key column. 3) Case-insensitive: use LOWER or UPPER to normalize before the comparison. 4) Dynamic range: define a named range Data and use =COUNTIF(Data, A2)>1. These examples cover common use cases, but tailor the approach to your dataset schema.
Tools & Materials
- Google account with access to Google Sheets(No software installation required)
- Sample dataset containing duplicates(Helpful for practice and testing rules)
- Backup copy of data(Always create a restore point before mass edits)
- Access to a range you plan to analyze(Prefer dynamic ranges or named ranges for growing data)
- Knowledge of your sheet structure(Headers, columns, and data types should be clear)
Steps
Estimated time: 20-40 minutes
- 1
Select the target data range
Identify the range you want to check for duplicates (for example A2:A100). If your sheet has a header, exclude it from the range so headers aren’t highlighted. This sets the scope for both conditional formatting and any helper formulas.
Tip: Keep headers out of the range or use a separate header row check. - 2
Decide on your approach
Choose between a visual approach (conditional formatting) and a data-flag approach (helper column with a formula). Your choice depends on whether you want to see color highlights or a separate indicator column for downstream tasks.
Tip: For quick checks, start with conditional formatting. - 3
Apply conditional formatting (single column)
Select the range (e.g., A2:A100), go to Format > Conditional formatting, choose "Custom formula is" and enter =COUNTIF($A$2:$A$100, A2)>1, then pick a color and click Done. This highlights all duplicates in real time as you edit data.
Tip: Use a non-default color to ensure visibility. - 4
Optionally add a helper column
In B2, enter a formula that returns a marker when a duplicate is found (e.g., a text like 'duplicate' or a numeric flag). Fill down to apply to all rows. This gives you a clear column-based indication without relying on color alone.
Tip: Hide the helper column if you prefer a cleaner sheet. - 5
Handle multi-column duplicates
If duplicates span multiple columns, create a key by concatenating values (e.g., =A2&"|"&B2) and check duplicates on the key. Normalize case if needed with LOWER/UPPER to avoid false negatives.
Tip: Anchor the ranges with $ to maintain consistency. - 6
Verify results
Test with known duplicate entries to confirm highlighting or flags update as data changes. Adjust ranges and rules if the dataset grows or if there are header shifts.
Tip: Always back up before large edits.
FAQ
What is the easiest way to highlight duplicates in a single column?
Use conditional formatting with a formula like =COUNTIF($A$2:$A$100, A2)>1 and apply a distinct color. Ensure the range excludes the header.
Apply a conditional formatting rule using COUNTIF to color duplicates in a column.
How can I detect duplicates across multiple columns?
Create a key by concatenating the columns (for example, A2&"|"&B2) and apply a duplicate check on that key to flag repeated combinations.
Use a concatenated key across columns and check for duplicates on that key.
How do I exclude the header row from highlighting?
Include only data rows in the range used by the rule or adjust the formula to skip the first row.
Make sure the header isn’t included in the range used by the rule.
Is the duplicate detection case-sensitive?
By default, Google Sheets duplicate detection is not case-sensitive. Normalize text with LOWER or UPPER if you need case-sensitive checks.
It's not case-sensitive by default; you can normalize text to compare.
Can I remove duplicates after highlighting?
Yes. Use Data > Data cleanup > Remove duplicates or filter and delete flagged rows. Always back up first.
You can remove duplicates using built-in clean-up tools after highlighting.
What about performance on large sheets?
Limit the affected range, use named ranges, and avoid full-column rules to keep performance acceptable.
Limit the range and use simpler rules for large datasets.
The Essentials
- Highlight duplicates without deleting data
- Choose formatting or a helper column based on needs
- Use a concatenated key for multi-column checks
- Always validate results with test cases
