Duplicate detection, grouping, and report export
Duplicate Rule In Google Sheets
Use a read-only duplicate check for duplicate rule 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.
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.
A duplicate rule in Google Sheets can flag repeated values without deleting or changing source records. Apply a custom formula in conditional formatting to highlight matches, or build a separate report with group counts and row numbers before deciding what to do with them.
This tool checks duplicate rule in google sheets in a read-only way and keeps your data in your browser.Define the duplicate rule
Choose the key that makes two records duplicates. An email address may identify a contact, while an order might require both an order ID and a product ID. Matching one column does not necessarily mean that entire rows are identical.
Define the data range before checking it. The examples below use headers in row 1 and records in rows 2–1000. Adjust the last row and column references to cover your data set; values outside the chosen range will not be checked.
Normalize the selected values
Inconsistent spaces can hide matches. To create a helper key for values in column A, enter this in B2 and fill it down:
=IF(A2="","",LOWER(TRIM(A2)))
TRIM removes leading and trailing spaces and reduces repeated ordinary spaces; LOWER makes the helper text lowercase. For example, Alice and alice produce the same key. This does not fix every character difference: nonbreaking spaces, punctuation, formatting and data types may need separate review.
Keep the original column intact so you can inspect what changed. Normalization can also merge values that should remain distinct, so confirm that case and spacing are irrelevant to your rule. If column B already contains data, use an empty helper column and adjust the formulas below.
Group and count matches
Use QUERY on the helper column to create a summary in an empty area or on a report sheet:
=QUERY(B2:B1000,"select B, count(B) where B is not null group by B having count(B) > 1 label B 'Key', count(B) 'Count'",0)
The output contains each repeated normalized key and its total count, including its first occurrence. A count of three means three rows share that key; it does not by itself identify which record should be kept. If no key repeats, there may be no data rows in the result.
For a row-level count, enter the following in C2 and fill it down: how-to-find-duplicate-information-in-google-sheets
=IF(B2="","",COUNTIF($B$2:$B$1000,B2))
A value greater than 1 marks every row in a duplicate group. Blank helper keys remain blank rather than being reported as a duplicate group. COUNTIF treats * and ? in criteria as wildcards, so use an exact-comparison method if keys can contain those characters.
Highlight duplicates with conditional formatting
A formatting rule makes repeated values visible in the source sheet without removing them. For normalized keys in column B, select the records to highlight and use a custom formula that checks the corresponding key:
- Select
A2:B1000, or select a wider range if the whole record should be highlighted. - Choose Format → Conditional formatting.
- Under Format cells if, choose Custom formula is.
- Enter the formula below, choose a format, and select Done.
=AND($B2<>"",COUNTIF($B$2:$B$1000,$B2)>1)
The fixed range supplies the comparison scope. $B2 keeps the key column fixed while the row changes across the selected range. The rule highlights all members of each group, including the first, and ignores blank keys.
To highlight only later occurrences, use a range that expands from the first data row:
=AND($B2<>"",COUNTIF($B$2:$B2,$B2)>1)
Row order determines which occurrence remains unhighlighted. Sorting the spreadsheet can change that result, so do not treat the unhighlighted row as the correct record without checking it. These rules also inherit COUNTIF wildcard behavior. apps-script-duplicate-sheet
Inspect the report for duplicate rule in Google Sheets
A useful duplicate report connects group counts to source rows. Add a row-number helper in an empty column, starting in D2, and fill it down:
=ROW()
Filter the helper count column for values greater than 1. Review the original value, normalized key, count and row number together. For example, if rows 4 and 9 both have the key alice, each receives a count of 2; inspect the other fields before treating either record as redundant.
Row numbers describe positions in the current sheet, not permanent identifiers. Capture an existing unique record ID as well when available, especially if people may sort or insert rows after the check. A filtered view can hide records without removing them; clear the filter to restore the full view.
The embedded duplicate checker can also check pasted CSV or TSV data using selected columns and return grouped counts and row-level evidence. Its check is read-only, and data stays in the browser; review the chosen key scope before relying on its report. google-script-duplicate-sheet-and-rename
Check a composite key
For records that repeat only when both columns A and B match, count both conditions. Enter this in an empty column on row 2 and fill down:
=IF(OR(A2="",B2=""),"",COUNTIFS($A$2:$A$1000,A2,$B$2:$B$1000,B2))
A result greater than 1 means the pair occurs more than once. This example excludes rows with either key component blank; change that policy only if incomplete records should be grouped. COUNTIFS criteria also interpret wildcard characters, and the formula compares the entered values rather than the normalized helper above.
To compare normalized pairs, create a separate helper for each component and point COUNTIFS at those helper ranges. Avoid joining fields without a reliable delimiter: different pairs can otherwise produce the same combined text.
Compare sheets within one spreadsheet
To check whether a value in Sheet1 column A appears in Sheet2 column A, put this in an empty Sheet1 cell on row 2 and fill down: does-not-equal-in-google-sheets
=IF(A2="","",IF(COUNTIF(Sheet2!$A$2:$A$1000,A2)>0,"Match","Not found"))
Match means the value occurs at least once in the second sheet; it does not count duplicates within both sheets or confirm that entire records match. Rename Sheet2 in the formula to the actual sheet name, enclosing names with spaces in single quotes. Apply the same normalization rules on both sheets when spacing or case is part of the matching policy.
Export evidence
Before exporting, confirm the selected range includes all relevant records and that the header is not counted as data. Check blank keys, wildcard characters, inconsistent types and normalized values that may represent different entities. A duplicate sheet in Google Sheets can also mean a copied tab; copying a tab is separate from detecting repeated records.
For a manual evidence file, place the filtered records or summary in a separate report sheet, including source identifiers, row numbers, key columns and counts. Check that the report contains the intended rows, then use File → Download and select a suitable format. CSV exports the current sheet, so select the report sheet first; a Google Sheets download in another format may include different content.
Keep the source unchanged until someone reviews the evidence and chooses a cleanup rule. A repeated key may be a legitimate repeat, an update or an error; group counts alone cannot distinguish those cases.
FAQ
Does this page delete duplicate rule in google sheets?
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