how to highlight duplicates in google sheets

How to Highlight Duplicates in Google Sheets: Explained

Learn how to highlight duplicates in Google Sheets with this easy guide. Discover tips and simplify your data management.

I was working on this spreadsheet with a ton of duplicate data the other day. It was so frustrating trying to figure out how many times the same name came up, but I found a few tricks to make it easier. 

If you’ve ever worked with Google Sheets, chances are you’ve run into duplicates. Maybe it was a contact list where the same name showed up three times, or a product report with repeating SKUs. Whatever the case, you’ve probably stared at all that data and thought, “How many times does this show up?” It’s frustrating, right? 

I’ve been there too. After a lot of trial and error (and way too much coffee), I’ve figured out a few ways to deal with duplicates that work for different situations and skill levels. Tackling duplicates isn’t just about organizing your spreadsheet, it’s a simple way to boost workplace productivity. This guide will walk you through everything you need to know about spotting duplicates in Google Sheets ,  the “how,” the “why,” and what works best for you.

Why Highlighting Duplicates Matters

Let me share a quick story. A few years back, I was working with a nonprofit, managing donor data for an event. We decided to send invites based on last year’s attendance. We pulled the list, designed a great email, and sent it out.

Within minutes, the complaints started rolling in. People were getting duplicate emails ,  some received two, others three! Talk about embarrassing. Turns out, the issue was duplicated in the Google Sheet.

That experience really stuck with me. It wasn’t just an email blunder; it was a lesson in how messy data can hurt trust, professionalism, and even cost you opportunities. Duplicates aren’t just annoying ,  they can have real consequences.

Different Kinds of Duplicates: Know Your Enemy

Before we jump into the how-to, it’s crucial to understand what kind of duplicates you’re up against. Just like not all villains wear capes, not all duplicates are created equal.

How to Highlight Duplicates in Google Sheets Work Flow

1. Exact Value Duplicates in a Single Column

Think of a student list where “John Smith” appears twice in the “Name” column. Easy to spot, right? But when you’re working with hundreds or thousands of rows ,  not so much.

2. Duplicates Across Multiple Columns

Sometimes, the same value could appear in multiple places ,  like the same phone number showing up in two different contact fields.

3. Duplicate Rows (All Columns Match)

This one’s sneaky. You won’t notice it unless you compare full rows. Two rows might have identical data across all columns ,  a true duplicate.

4. Partial Duplicates

Maybe only the email is the same, but the name is slightly different. These require a more nuanced approach, often using formulas or scripts.

Option 1: The Beginner’s Savior – Conditional Formatting

Let’s start simple. This was my first go-to method, and frankly, it still holds up for many everyday needs.

Use Case: You want to highlight duplicate values in a single column.

Step-by-Step:

  1. Select the Column: Click and drag to highlight the cells in the column.
  2. Open Conditional Formatting: Go to Format > Conditional formatting.
  3. Custom Formula:
=COUNTIF($A$1:$A$100, A1) > 1
  1. Pick a Format: Choose a background color or text style.
  2. Click Done.

Why it works: It counts how many times the value in each cell appears in the column. If it’s more than once, it highlights it.

Tip:

Always anchor your range properly with dollar signs ($). I once forgot, and instead of duplicates, I highlighted the spreadsheet equivalent of abstract art.

Option 2: Mid-Level Mastery – Using Formulas Like COUNTIF

This method is for those who want more control ,  maybe even want to count how many duplicates exist or flag them in a separate column.

Formula Example:

=IF(COUNTIF(A:A, A2) > 1, "Duplicate", "Unique")

Place that in a new column. Google Sheets will scan each row and tell you if it’s a duplicate.

Why It’s Useful:

  • You can filter by “Duplicate” to isolate them.
  • You can use this in combination with scripts or filters to manage your data more dynamically.

Think of this like a bouncer at a club. Each name (cell) comes up to the door, and the bouncer (COUNTIF) checks if they’ve already let someone in with that name.

Option 3: Exact Row Match – Detecting True Duplicates Across Columns

Let’s say each row is a full record ,  name, email, phone number ,  and you want to find identical rows.

Here’s the magic formula:

=COUNTIF(ArrayFormula($A$1:$A$100 & $B$1:$B$100 & $C$1:$C$100), A1 & B1 & C1) > 1

Apply this in Conditional Formatting, and it will highlight rows where every value matches.

For Example:

In a content management spreadsheet, I had articles listed with title, author, and publish date. I used this formula to find duplicated entries ,  sometimes due to accidental pasting.

Option 4: Full Automation – Google Apps Script

For the tech-savvy or the adventurous, this option is a game-changer.

Here’s a basic script that highlights duplicates in Column A:

function highlightDuplicates() {

  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();

  var data = sheet.getRange("A1:A100").getValues();

  var flatData = data.flat();

  var duplicates = [];

  flatData.forEach(function(value, index) {

    if (value && flatData.indexOf(value) !== index && !duplicates.includes(value)) {

      duplicates.push(value);

    }

  });

  for (var i = 0; i < flatData.length; i++) {

    if (duplicates.includes(flatData[i])) {

      sheet.getRange(i + 1, 1).setBackground("#f4cccc");

    }

  }

}

Why Use This?

  • Automate large-scale data checks.
  • Customize for specific use cases.
  • Save time on repeated tasks.

I Started With Scripts…

At first, it felt like overkill. But once I had to clean a dataset of 10,000+ entries, this script saved hours. Literal hours.

Option 5: Plug-and-Play Tools – Add-ons That Do the Heavy Lifting

Sometimes, you want things done fast and with minimal setup. That’s where add-ons like Remove Duplicates by AbleBits shine.

How It Works:

  1. Go to Extensions > Add-ons > Get add-ons.
  2. Search and install Remove Duplicates.
  3. Open it via Extensions > Remove Duplicates > Start.
  4. Follow the prompts to:
    • Select the range.
    • Choose duplicate criteria.
    • Apply formatting or delete duplicates.

The Value Add Here:

  • Zero coding.
  • Visual interface.
  • Great for teams or non-technical users.

Common Mistakes and How to Avoid Them

  1. Not anchoring ranges with $: This can throw off your entire conditional formatting logic.
  2. Applying formulas to partial ranges: Make sure you cover all your data or risk missing some duplicates.
  3. Assuming visual uniqueness = data uniqueness: “John Smith” and “ John Smith” (with a space) are different to Sheets.
  4. Deleting without backing up: Always, always make a copy before applying mass changes.
How to Highlight Duplicates in Google Sheets - Comparison of Duplicate Detection Methods

Which Method Should You Choose? A Practical Comparison

MethodBest ForTechnical SkillAutomationVisual Clarity
Conditional FormattingQuick highlightsLowNoHigh
COUNTIF FormulaSorting/filteringMediumNoMedium
Exact Row MatchFull-row duplicatesMediumNoMedium
Apps ScriptLarge-scale cleanupHighYesLow
Add-onsVisual, guided usersLowYesHigh

What Duplicate Data Taught Me About Clean Living

  • Working with duplicates taught me more than just spreadsheet skills ,  it taught me the value of clarity. 
  • I learned the importance of catching errors early and not letting small problems grow into bigger ones. 
  • Clean data leads to clearer decisions, sharper communication, and faster, more confident work. 
  • This isn’t just about Google Sheets ,  it’s about respecting your time, your team, and your data. 
  • Whether you’re new to spreadsheets or managing massive datasets, I hope this guide helps you find clarity and control. 
  • And if you’re anything like me, you might even start to enjoy the process ,  there’s nothing more satisfying than turning chaos into clean.

Useful Resources

  1. Data Cleaning: Definition, Benefits, And How-To: A comprehensive guide on cleaning data, covering steps like removing duplicates, fixing structural errors, and handling missing data.
  2. Top Ten Ways to Clean Your Data: Practical tips for cleaning data, including spell checking, removing duplicates, and replacing text efficiently.
  3. Research Data Management: Data Management Best Practices: Best practices for organizing and managing research data to ensure proper documentation and discoverability.

Liked this guide? Bookmark it. Share it. Refer to it the next time your spreadsheet starts acting up.

Was this article helpful?

Thanks for your feedback!
Scroll to Top