Duplicate detection, grouping, and report export
How To Check Two Google Sheets For Duplicates
Use a read-only duplicate check for how to check two google sheets 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.
Report reading guide
Read duplicate results in three passes
- Scope: confirm selected key columns.
- Groups: review repeated values and counts.
- Rows: compare source row numbers before acting.
To check two Google Sheets for duplicates, compare a key column in one sheet against the corresponding column in the other with COUNTIF. Add the formula in a helper column, fill it down, and review the rows marked as matches. This checks whether a value appears in both sheets without changing or deleting the source data.
Compare two sheets by a key column
Assume two tabs in the same spreadsheet are named Sheet1 and Sheet2. Each has a header in row 1 and customer IDs in column A, with data in rows 2–1000. Put this formula in Sheet1!B2:
=IF(A2="","",IF(COUNTIF(Sheet2!$A$2:$A$1000,A2)>0,"Match","Not found"))
Fill it down alongside the data in Sheet1. A nonblank ID is marked Match if it appears at least once in Sheet2; otherwise, it is marked Not found. The empty-string check leaves blank source cells unmarked, and the dollar signs keep the lookup range fixed as you fill the formula down.
For example, if Sheet1!A2 contains C104 and Sheet2 contains C104 twice, the result is Match. The label does not tell you which rows matched or how many copies exist. Replace the inner comparison with the following formula in an empty helper column to see the count in Sheet2 instead:
=IF(A2="","",COUNTIF(Sheet2!$A$2:$A$1000,A2))
A count of 2 means two cells in the second range match that key. It does not count copies in Sheet1. To find values present only in Sheet2, repeat the comparison there, reversing the sheet references. Extend each range when data grows beyond row 1000; an omitted row cannot be matched.
If the data sets are in separate spreadsheet files, first bring the required column into a tab in the comparison spreadsheet with IMPORTRANGE, then compare against that imported range. IMPORTRANGE requires the source spreadsheet URL or key and a range string, and access may need approval. For example, after replacing the placeholder with the source URL, enter this in an empty tab: how to check two google sheets for duplicates
=IMPORTRANGE("source_spreadsheet_url","Sheet2!A1:A1000")
Wait for the imported values to appear, then point the COUNTIF formula at that tab. A permission error or incomplete import is not evidence that values are missing.
Normalize the selected values
Decide what should count as the same value before comparing sheets. Extra spaces, inconsistent capitalization, and values stored as text instead of numbers can affect results. Keep the original column and create a helper key in both sheets rather than overwriting the source.
For text IDs, this example removes leading and trailing spaces and converts letters to lowercase:
=IF(A2="","",LOWER(TRIM(A2)))
Fill the formula down on both tabs, then compare the helper columns instead of the original IDs. TRIM also reduces repeated ordinary spaces within text, so use it only if that change is acceptable for the key. Review nonbreaking spaces, punctuation and leading zeros separately; normalization should not merge identifiers that are genuinely different.
COUNTIF is not case-sensitive. If ABC and abc must be different, compare the original values with EXACT and count the true results instead:
=IF(A2="","",IF(SUMPRODUCT(--EXACT(A2,Sheet2!$A$2:$A$1000))>0,"Match","Not found"))
Use bounded ranges for this case-sensitive comparison, and test representative values before filling it down. For a composite key, define which columns identify a record and compare those fields together; matching on a name alone can group different people. how to check two google sheets for duplicates
Group and count matches
A combined list helps distinguish cross-sheet matches from duplicates that occur only within one sheet. First place the two key ranges in one column on a report tab. For example, put this in Report!A2, leaving the cells below it empty:
={Sheet1!A2:A1000;Sheet2!A2:A1000}
In Report!B2, list each nonblank key once:
=UNIQUE(FILTER(A2:A,A2:A<>""))
In Report!C2, count occurrences of the first listed key, then fill down beside the returned values:
=COUNTIF($A$2:$A,B2)
Counts above 1 identify repeated values across the combined data set, but they do not by themselves prove that a key occurs in both sheets. Add separate COUNTIF columns against Sheet1 and Sheet2; a positive count in each confirms a cross-sheet match. If all keys are blank, FILTER can return a no-matches error instead of a list.
Inspect the duplicate report
Check the key, its count in each sheet and the original rows before treating a match as an error. A customer ID may legitimately appear on several transaction rows, while a repeated order ID may need investigation. A duplicate key is not necessarily a duplicate of the entire row.
To display rows from Sheet1 that match the other sheet, use the status helper column and adjust the returned range to include the fields you need: how to check two google sheets for duplicates
=FILTER(Sheet1!A2:B1000,Sheet1!B2:B1000="Match")
FILTER returns matching rows from the specified range, not source row numbers. Add a helper column with =ROW() on each source sheet if row-level evidence is needed, and include it in the filtered range. Keep the source sheet name with each row number so the location remains unambiguous. If there are no matching rows, FILTER returns a no-matches error.
For a row-by-row difference check, =A2<>Sheet2!A2 returns TRUE when the two cells are not equal. This is useful only when rows are aligned by the same record; it does not search the second sheet for a value appearing elsewhere. Sorting one sheet independently can make aligned comparisons misleading.
The embedded duplicate checker can check pasted TSV or CSV data using selected columns and provide a downloadable report. Keep the manual comparison or source row references when you need to verify where each match came from.
Filter and export evidence
To filter out duplicates for review, apply a filter to the helper status or count column and display the relevant labels or counts. Filtering hides rows from view; it does not delete them. UNIQUE produces a separate list of distinct values, but it does not decide which source record should be retained when other fields differ.
Before exporting a report, include the key, source sheet, source row number, match status and counts needed to reproduce the finding. Check that headers are excluded from the comparison and that ranges cover all intended rows. Export the report sheet through File → Download in a suitable format, then inspect the downloaded file. Preserve the original sheets until someone has reviewed the evidence and chosen any cleanup action.
FAQ
Does this page delete how to check two google sheets for duplicates? No, it returns a read-only duplicate report.
Paste data for how to check two google sheets for duplicates; select the key scope; inspect grouped counts, row indexes, and exportable evidence.
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