Duplicate detection, grouping, and report export
Search For Duplicates On Different Google Sheets
Use a read-only duplicate check for search for duplicates on different 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.
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 search for duplicates on different Google Sheets, compare a key column from one sheet with the corresponding column on another using COUNTIF. Keep the source data unchanged, then inspect matching rows and group counts before exporting evidence or deciding whether any record needs correction.
Use the embedded duplicate checker to compare pasted data by selected columns and get grouped counts plus row indexes.Compare keys across two sheets
Assume two tabs in the same spreadsheet are named Orders and Archive. Both store order IDs in column A, with headers in row 1. To flag each ID in Orders that also appears in Archive:
- Add a results column on
Orderswithout overwriting existing data. - Enter this formula in an empty cell on row 2, such as
B2if column B is free:
=IF(A2="","",IF(COUNTIF(Archive!$A$2:$A$1000,A2)>0,"Match","Not found"))
- Fill the formula down to the last relevant row.
- Filter the results column for
Matchto inspect the corresponding records.
The first IF leaves blank keys unlabelled. COUNTIF checks the fixed Archive range for the value in A2; the relative reference changes to A3, A4, and so on as you fill down. Increase row 1000 if the comparison data extends farther, and use the correct tab name and key column for your data set.
A Match means the key appears at least once on the other tab. It does not prove that every field in the two rows matches, or that either record should be deleted. Repeated keys within Orders are each flagged when the same key appears in Archive.
To see how many times each key occurs on the other tab, use this in a separate empty column and fill down:
=IF(A2="","",COUNTIF(Archive!$A$2:$A$1000,A2))
For example, if ID 1042 occurs three times in Archive, the returned value is 3 for each Orders row with that ID. A zero means no match was found within the specified range, not necessarily anywhere else in the spreadsheet.
Normalize the selected values
Inconsistent spaces or capitalization can obscure whether text keys represent the same entity. If those differences should not distinguish records, create helper columns on both tabs rather than changing original values. For a text key in A2, enter this formula in an empty helper column and fill down:
=IF(A2="","",LOWER(TRIM(A2)))
Then compare the two helper ranges instead of the original columns. For example, if both normalized keys are in column C, use C2 as the criterion and Archive!$C$2:$C$1000 as the comparison range. Keep the same normalization rule on both sides.
TRIM handles ordinary spaces, while LOWER standardizes letter case. Neither corrects spelling, removes every invisible character, or decides whether two different identifiers belong to the same person. Review normalized matches against the original values, especially when spaces or capitalization carry meaning.
Group and count matches
A row-level flag shows where to look; a grouped report shows how often each key appears. After creating normalized keys in column C on both tabs, place this formula on a separate report tab with enough empty space for its output:
=QUERY({Orders!C2:C1000;Archive!C2:C1000},"select Col1, count(Col1) where Col1 is not null group by Col1 having count(Col1) > 1 label Col1 'Key', count(Col1) 'Occurrences'",0)
The array stacks the two key ranges, and QUERY groups nonblank keys with more than one occurrence. If 1042 appears twice in Orders and once in Archive, its group count is 3. The report combines occurrences from both tabs, so a key repeated only within one tab also appears; use the cross-sheet COUNTIF check to establish whether it occurs on both.
Keep key types consistent before grouping. If IDs contain meaningful leading zeros, preserve them as text in both sources; a number such as 42 and a text identifier such as 0042 should not be treated as interchangeable without a defined rule.
Inspect the report for duplicates across sheets
Review the key, source tab, row number, and relevant fields together. A repeated customer ID may represent multiple valid orders, while a repeated order ID may warrant investigation. Choose a key that reflects the record you intend to check, not merely a column that happens to repeat.
For row-level evidence, filter each tab by a reported key and record its sheet name and original row number. The ROW() function can provide a source-row reference in a helper column; fill =ROW() down alongside the source data. Capture these references before copying results to a report, because row positions in the report differ from source positions.
For a multi-column identity, build the same helper key on each tab only after agreeing which fields define a duplicate. Use a separator that cannot occur in the component values, or otherwise encode the fields unambiguously. Check blanks and inconsistent formats first: two incomplete records should not automatically become a meaningful duplicate group.
The embedded duplicate checker can check pasted TSV or CSV data using selected columns and return grouped counts and row indexes without changing the source sheet. Include a source label in the pasted data if you need to distinguish records from different tabs when reviewing the result.
Compare separate spreadsheet files
For tabs in different spreadsheet files, first bring the comparison range into a working tab with IMPORTRANGE. Use the source spreadsheet URL or ID and its tab and range in the function; replace the placeholders with your own values:
=IMPORTRANGE("source_spreadsheet_url_or_id","Archive!A2:A1000")
Grant access when Google Sheets prompts you. Once the values appear on a working tab named Imported, compare Orders!A2 against Imported!$A$1:$A$999 with the same COUNTIF pattern. The imported range begins at row 1 of the working tab, even though its source begins at row 2.
Imported values depend on access to the source and can take time to refresh. Check that the import completed and covers the intended rows before interpreting a Not found result. For tab names containing spaces, enclose the tab name in single quotes inside the range string, such as 'Old Archive'!A2:A1000.
Export evidence
Create a report containing the checked key, match count, source tab, source row number, and any fields needed to distinguish records. Include the checked ranges and the date of review so another person can understand the scope. Remove unnecessary personal data before sharing the report.
Download the report from Google Sheets using File → Download and an appropriate format, such as CSV for a single report sheet. Verify the downloaded file contains the expected rows and columns; CSV does not preserve formulas or formatting as a live spreadsheet report. The embedded checker also supports downloading its results.
Common mistakes include comparing unequal key columns, excluding later rows from fixed ranges, counting blanks, and treating a group count as proof of a cross-sheet match. Check the scope and inspect the underlying records before making any cleanup decision.
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