Duplicate and Fuzzy Highlighting in Google Sheets

Conditional formatting is a fast way to highlight exact duplicates in Google Sheets. When values are similar rather than identical, you can add helper columns or Apps Script to flag likely matches for review before making changes.


Highlight exact duplicates

Select the range and use Format > Conditional formatting with a custom formula such as =COUNTIF($A$2:$A, $A2)>1. For full-row duplicate checks, COUNTIFS can compare multiple columns. This works well for exact values but not for typos or formatting differences.


Use a helper column for near matches

For near matches, create a helper column that stores a normalised key, a similarity score or a review flag. Then apply conditional formatting to the original range based on that helper column. This separates comparison logic from visual highlighting.

function flagNearDuplicateCandidates() {
  const sheet = SpreadsheetApp.getActiveSheet();
  const values = sheet.getRange("A2:A").getValues();
  const seen = {};
  const flags = values.map(function (row) {
    const raw = String(row[0] || "").trim();
    if (!raw) return [""];
    const key = raw.toLowerCase().replace(/[^a-z0-9]/g, "");
    if (seen[key]) return ["Review"];
    seen[key] = true;
    return [""];
  });
  sheet.getRange(2, 2, flags.length, 1).setValues(flags);
}

This example flags normalised exact matches after removing punctuation and spacing. For true fuzzy similarity, you can calculate scores in Apps Script or in-sheet formulas and flag rows above a chosen threshold for manual review.


Using Flookup custom functions

Flookup custom functions can help you score and review similar values in Google Sheets. FUZZYSIM returns a similarity score between two values, FLOOKUP can find close matches in a table and DEDUPE or ULIST support duplicate and unique-value workflows. See the custom functions documentation for syntax and examples. The Sheets AI Assistant page explains how to get formula suggestions for your data.