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

Duplicate detection, grouping, and report export

Formula To Check Duplicates In Google Sheets

Use a read-only duplicate check for formula to check duplicates in google sheets 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 formula to check duplicates in google sheets 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

Use COUNTIF to check for duplicate values in Google Sheets without deleting source data. If values are in A2:A100, enter the formula below in B2 and fill it down. Every nonblank value that occurs more than once in that range receives the label Duplicate.

Try the built-in duplicate checker for Google Sheets by pasting your TSV or CSV data.
=IF(A2="","",IF(COUNTIF($A$2:$A$100,A2)>1,"Duplicate","Unique"))

The fixed range $A$2:$A$100 defines the data set being checked. The relative cell reference A2 changes to A3, A4, and so on as you fill down. Adjust the range to cover your records; values outside it will not be counted.

Check duplicate values in one column

  1. Identify the column containing the key, such as an email address or order ID. Keep its header outside the checked range.
  2. Choose an empty helper column and enter the formula beside the first data row.
  3. Fill the formula down through the last row of the selected range.
  4. Filter the helper column for Duplicate and inspect the matching source rows.

For example, if A2 and A7 both contain pear, both rows are labeled Duplicate. A value that appears once is labeled Unique; a blank cell produces no label. The formula flags every occurrence, not only the later copies.

To keep the first occurrence unmarked and flag later occurrences, use an expanding range:

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

Fill this formula down from B2. The first pear receives First occurrence; the second receives Duplicate. This distinction depends on row order, so sorting the source data can change which row is treated as first.

Normalize the selected values

Spaces and capitalization can obscure the comparison you intend. If leading, trailing, or repeated ordinary spaces should not distinguish text values, create a helper key in C2 and fill it down:

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

Then check C2:C100 with the first COUNTIF formula, replacing both the counted range and the current cell reference. For example, use $C$2:$C$100 and C2. The original values remain available in column A for review.

TRIM does not remove nonbreaking spaces, and normalization can merge values that your workflow treats as distinct. Review the keys before relying on the result. Also check whether numbers, dates, and identifiers were imported with consistent types and formatting; a displayed value alone may not reveal a difference in stored data.

Group and count matches

A helper-column label identifies rows, while a grouped report shows which values repeat and how often. To list nonblank values from A2:A100 that occur more than once, place this formula in an empty area: google sheets formula to check for duplicates

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

The result contains one row per repeated value and its count. For normalized groups, point the formula at the helper-key range instead. QUERY may treat mixed data types in one column differently from the way they appear on screen, so check imported values and results before using the report as evidence.

To see the source row numbers for a specific value, place that value in E2 and enter this formula in an empty cell:

=IF(E2="","",IFNA(FILTER(ROW(A2:A100),A2:A100=E2),"No matches"))

If E2 contains pear and the value appears in rows 2 and 7, the result lists 2 and 7. Compare against the same key column used for grouping, especially when normalized values are involved. The row numbers refer to the current sheet layout and may change after sorting or inserting rows.

Check duplicate rows using multiple columns

A repeated value in one column does not necessarily mean the entire record is repeated. If an order is a duplicate only when both its customer in column A and product in column B match, use COUNTIFS: how to check for duplicates in different google sheets

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

Enter the formula in an empty helper column on row 2 and fill it down. Both criteria ranges must cover the same rows. This example skips records with a blank customer or product; change that rule only if incomplete records should be compared.

For example, two rows with customer Lee and product Pen are duplicate pairs, but Lee with Paper is a different pair. Add another range and criterion to COUNTIFS when a third field belongs to the key. Select fields that define a duplicate for your task rather than assuming every repeated name is an error.

Compare values across sheets

To check whether each value on the current sheet appears in column A of a sheet named Archive, enter this beside the current value and fill down:

=IF(A2="","",IF(COUNTIF(Archive!$A$2:$A$100,A2)>0,"Found in Archive","Not found"))

Found in Archive means the current value has at least one match in the specified range. It does not mean that the value is duplicated within either individual sheet. Expand the range reference when the archive has more rows, and use a quoted sheet name such as 'Old Records'!$A$2:$A$100 when the name contains spaces. check for duplicates google sheets across multiple sheets

Inspect the report for duplicate formulas

Check the scope, group counts, and underlying rows before deciding what a match means. A repeated email may represent two valid transactions, while a repeated order ID may need investigation. Formula results provide evidence for review; they do not establish which record is correct.

Watch for these common mistakes:

  • Incomplete range: A formula ending at row 100 misses records below it. Update both the range and the filled-down helper formulas when data grows.
  • Wrong reference: Without $ anchors, the counted range shifts as you fill down and can produce inconsistent counts.
  • Blank keys: Decide whether incomplete records should be excluded or checked separately. The examples above exclude them.
  • Wildcard characters: COUNTIF and COUNTIFS interpret * and ? in criteria as wildcards. Check keys containing those characters with an exact comparison, or escape them before using them as criteria.
  • Changed row order: First-occurrence labels and exported row indexes reflect the current order, not a permanent record identity.

For literal single-column keys containing wildcard characters, this alternative uses equality rather than COUNTIF criteria. Enter it in B2 and fill down:

=IF(A2="","",IF(SUMPRODUCT(--($A$2:$A$100=A2))>1,"Duplicate","Unique"))

Keep the range bounded to the relevant records, and test the result on representative values. Like the earlier formula, it labels all occurrences and leaves blank keys unlabeled. google sheets check for duplicates 3 cells

Export evidence

Keep the key, count, and source row references together when sharing a duplicate report. Add stable record IDs where available, along with the sheet name and checked range, so another reviewer can locate each record even if the sheet is later sorted.

For a manual export, place the report in a separate sheet, then use File → Download and select a suitable format. If you need a snapshot rather than formulas that can recalculate, copy the report and use Edit → Paste special → Values only in the separate sheet before downloading. Verify the exported file and its scope before sharing it.

The embedded duplicate checker also accepts pasted TSV or CSV data, checks selected columns, and provides grouped counts, row indexes, and downloadable evidence. Its check is read-only; reviewing the report does not remove or change records in the source sheet.

FAQ

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