Check for Duplicates in Google Sheets
en
Run read-only duplicate check

Duplicate detection, grouping, and report export

How To Have Google Sheets Check For Duplicates

Use a read-only duplicate check for how to have google sheets check for duplicates when you need to inspect repeated values without changing the source sheet. Paste the relevant data, select the key scope, review grouped counts and row indexes, and export the evidence.

Inspect duplicate groups in the selected sheet dataKeep source values unchanged during the checkExport row-level evidence for the next step
Run read-only duplicate check
Review grouped matches for how to have google sheets check for duplicates before exporting duplicate evidence.

Report reading guide

Read duplicate results in three passes

  1. Scope: confirm selected key columns.
  2. Groups: review repeated values and counts.
  3. Rows: compare source row numbers before acting.
Key customer@example.comCount 3 matchesRows 12, 27, 41

To have Google Sheets check for duplicates without changing your source data, use COUNTIF to flag repeated values or conditional formatting to highlight them. For a report, group the same values with QUERY, then review the counts and source row numbers before deciding what to do with the matches.

The check works with any pasted CSV or TSV data and needs no plugin installed in Google Sheets.

Check one column for duplicate values

Choose the column that defines a duplicate before writing a formula. For example, repeated email addresses in column A may indicate duplicate contacts, while repeated names alone may refer to different people. The examples below assume a header in row 1 and data in rows 2–1000.

  1. Add a helper column with the header Status.
  2. Enter this formula in B2 and fill it down through B1000:
=IF(A2="","",IF(COUNTIF($A$2:$A$1000,A2)>1,"Duplicate","Unique"))
  1. Filter column B for Duplicate to inspect every occurrence of each repeated value.
  2. Compare the flagged rows with the rest of their fields before treating them as duplicate records.

COUNTIF counts matches within the fixed range. The $ signs keep that range fixed as you fill the formula down, while A2 changes to the value on each row. Blank cells receive no label; extend the range if your data continues below row 1000.

This formula marks every occurrence, including the first. If you need to flag only later occurrences, use an expanding range instead:

=IF(A2="","",IF(COUNTIF($A$2:A2,A2)>1,"Repeated occurrence","First occurrence"))

The first nonblank occurrence is labeled First occurrence; later matches are labeled Repeated occurrence. Sorting the data can change which occurrence comes first, so preserve the original order if that distinction matters.

Normalize the selected values

Differences in spaces or capitalization can hide meaningful matches. To check text values after removing leading, trailing, and repeated ordinary spaces and converting text to lowercase, place this in a separate helper column, such as C2, and fill down:

=IF(A2="","",LOWER(TRIM(A2)))

Then run the duplicate formula against C2:C1000 instead of column A. Keep the original values for review: normalization can merge values that should remain distinct. TRIM does not remove every kind of invisible or nonbreaking space, so inspect unexpected results before changing the normalization rule.

COUNTIF is not case-sensitive, and its criteria interpret * and ? as wildcards. If literal wildcard characters occur in your keys, use an equality-based count instead. For normalized values in column C, this version counts literal matches and ignores blanks:

=IF(C2="","",IF(SUMPRODUCT(--($C$2:$C$1000=C2))>1,"Duplicate","Unique"))

Group and count matches

A grouped report shows which values repeat and how often. For a text key in A2:A1000, enter this formula in an empty area or a separate report sheet:

=QUERY(A2:A1000,"select A, count(A) where A is not null group by A having count(A) > 1 label A 'Value', count(A) 'Count'",0)

Each result row contains a value and its count across the selected range. A count of three means three source cells match that group, not three extra copies. If no value repeats, there may be no data rows in the result.

Use the normalized helper column as the QUERY input when the report should group normalized values. Keep data types consistent: mixed text and numeric values in one column can produce unexpected QUERY results because it chooses a data type for the column. For identifiers, decide whether leading zeros are significant before converting values to numbers.

Highlight duplicates in the spreadsheet

Conditional formatting makes repeated values visible without adding status text to each row. It changes the display, not the underlying cell values.

  1. Select A2:A1000, excluding the header row.
  2. Choose Format → Conditional formatting.
  3. Under Format cells if, select Custom formula is.
  4. Enter the formula below, choose a format, and select Done.
=AND(A2<>"",COUNTIF($A$2:$A$1000,A2)>1)

The reference A2 must correspond to the first cell in the applied range. To highlight entire records in A2:D1000 based on column A, apply the rule to A2:D1000 and use $A2 in place of A2 in both parts of the formula. This rule has the same wildcard limitation as COUNTIF; use an equality-based helper column if keys contain literal * or ?.

Check duplicates across multiple columns or sheets

A duplicate record may require several fields to match. For example, if columns A and B contain customer ID and order ID, put this formula in C2 and fill it down:

=IF(OR(A2="",B2=""),"",IF(COUNTIFS($A$2:$A$1000,A2,$B$2:$B$1000,B2)>1,"Duplicate pair","Unique pair"))

COUNTIFS counts rows where both criteria match. This example excludes any row with a blank ID; change that policy only after deciding whether missing data should form a duplicate group. As with COUNTIF, wildcard characters in criteria need care.

To compare sheets, first decide whether you want repeats within the combined data set or only values present on both sheets. For a value in A2 on the current sheet, this checks whether it also appears in column A of a sheet named Sheet2:

=IF(A2="","",IF(COUNTIF(Sheet2!$A$2:$A$1000,A2)>0,"Found on Sheet2","Not found on Sheet2"))

Fill down and replace Sheet2 and the ranges with your actual sheet name and scope. A match on both sheets does not by itself prove that either row is an unwanted duplicate; compare the other fields and investigate conflicting records. Enclose sheet names containing spaces in single quotes, as in 'Sales Data'!$A$2:$A$1000.

Inspect the duplicate report

Review group counts alongside individual rows. A repeated key can represent a valid recurring transaction, a shared contact detail, or an entry error. Check identifiers, dates, and other context before selecting any rows for correction.

For row-level evidence in a helper column, use ROW() and fill it down:

=ROW()

Filter the status column for duplicates and retain the row-number column in the report. These are current sheet row numbers, not permanent identifiers: sorting, inserting, or deleting rows can change their relationship to records. Record a stable ID as well when one exists.

The embedded duplicate checker accepts pasted CSV or TSV data and selected columns, then returns a read-only check with grouped counts and row indexes. Its report can be downloaded; confirm how its row indexes map to your pasted range and header before acting on them.

Export evidence

Create a separate report sheet with the key, status, count, source row number, and any stable record ID needed for review. Copy the filtered results into that sheet; if copying formulas, paste values so the exported evidence does not depend on references to the original range.

Use File → Download and choose a suitable format for the report, such as CSV for a single sheet. Check that the report sheet is active when exporting CSV, and open the downloaded file to verify its headers and rows. Avoid including unrelated sensitive columns when sharing evidence.

A check is not a cleanup decision. Keep the source intact until the report has been reviewed, and make a copy before any later deletion or merge.

FAQ

Does this page delete how to have google sheets check for duplicates?

No, it returns a read-only duplicate report.

Run read-only duplicate check to inspect duplicate detection, grouping, and report export and export a controlled report without destructive cleanup.

Run read-only duplicate check to inspect duplicate detection, grouping, and report export and export a controlled report without destructive cleanup.

Run read-only duplicate check

Run read-only duplicate check