Duplicate detection, grouping, and report export
How To Find Duplicate Values Google Sheets
Use a read-only duplicate check for how to find duplicate values 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 find duplicate values in Google Sheets without changing source data, count each value with COUNTIF in a helper column. Filter counts greater than 1 to inspect every occurrence, or use a grouped formula to produce one row per repeated value.
Count duplicate values in a column
Assume row 1 contains a column header and values are in A2:A1000. Use an empty helper column so the original data set stays unchanged.
- Enter
Countin B1. - Enter the formula below in B2 and fill it down to B1000.
- Select the data and helper column, then choose Data > Create a filter.
- Filter the count column to show values greater than 1.
=IF(A2="","",COUNTIF($A$2:$A$1000,A2))
COUNTIF counts matches across the fixed range. The reference to A2 changes as you fill down, while the dollar signs keep the search range fixed. Blank cells return a blank result rather than being counted.
For example, if A2 and A7 contain pear and no other cell does, both rows show 2. The filter shows both occurrences, not only the later one. Adjust the last row to include the full data set; values outside the range are not counted.
Mark only later occurrences
To keep the first occurrence separate from subsequent matches, use this formula in B2 and fill down:
=IF(A2="","",IF(COUNTIF($A$2:A2,A2)>1,"Duplicate","First"))
The expanding range ends at the current row. The first pear receives First; later occurrences receive Duplicate. Sorting the source rows can change which occurrence is first, so preserve the original order if it matters.
Highlight duplicate values
Conditional formatting makes repeated values visible in the source column without adding a count column. It changes formatting, not cell values.
- Select A2:A1000, excluding the header.
- Choose Format > Conditional formatting.
- Under format rules, select Custom formula is.
- Enter the formula below, choose a format, and select Done.
=AND(A2<>"",COUNTIF($A$2:$A$1000,A2)>1)
The formula highlights every nonblank occurrence in a duplicate group. The relative reference A2 must match the first cell of the applied range; the fixed range must cover all rows you want to check. Highlighting alone does not provide group counts or a separate report.
Build a grouped duplicate report
A grouped report shows each repeated value once with its count. Place this formula in an empty area or on a separate sheet, leaving room for two result columns:
=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)
For values pear, apple, pear, the report contains pear with a count of 2. QUERY excludes blanks and omits values that appear only once. Its output summarizes groups; use the filtered helper column when you also need the original rows.
QUERY columns with mixed data types can produce unexpected results because the majority type determines the column type and minority types are treated as null. Check whether identifiers are stored consistently as text or numbers before relying on group counts. Formula separators can also depend on spreadsheet locale; replace argument commas with semicolons if required, while keeping the query text unchanged.
Normalize the selected values
Decide what should count as a match before grouping. Extra spaces or capitalization may represent formatting differences rather than distinct identifiers, but removing distinctions can also merge records that should remain separate. count-duplicate-values
For text values, create a separate normalized key in B2 and fill down:
=IF(A2="","",LOWER(TRIM(A2)))
Use the helper column as the input to the count or grouped report, while retaining column A for review. TRIM removes leading and trailing ordinary spaces and reduces repeated ordinary spaces inside text; LOWER converts text to lowercase. Other whitespace characters and inconsistent punctuation may require separate review.
Group and count matches across multiple columns
If a duplicate means the same combination of fields, count the combination rather than either column alone. For names in A and dates in B, enter this in C2 and fill down:
=IF(OR(A2="",B2=""),"",COUNTIFS($A$2:$A$1000,A2,$B$2:$B$1000,B2))
COUNTIFS counts rows where both fields match the current row. The formula skips rows with a blank key field; change that policy only if incomplete records should participate. Equal names with different dates do not count as duplicates under this definition.
Inspect the report and compare sheets
Review group counts against source rows before deciding what each match means. A repeated customer name may represent different people, while a repeated transaction ID may need investigation. Counts identify matching keys; they do not establish which record is correct.
To check whether values in Sheet1 column A also appear in Sheet2 column A, put this formula in Sheet1 B2 and fill down:
=IF(A2="","",IF(COUNTIF(Sheet2!$A$2:$A$1000,A2)>0,"Match","Not found"))
This checks each Sheet1 value against the selected Sheet2 range. It does not count duplicates within Sheet1 or show Sheet2 row locations. Reverse the comparison to find values present only on Sheet2, and adjust sheet names and ranges to match the spreadsheet.
For an independent read-only check, the embedded duplicate checker accepts pasted TSV or CSV data and lets you choose columns. Its result provides grouped counts and row indexes for review without changing source values.
Export evidence
Keep enough context to trace each reported match back to the source. Include the selected key, group count, relevant record fields and source row number where needed. Add a row-number helper before filtering:
=ROW(A2)
Fill it down alongside the data, then filter the count column for values above 1. If you copy the filtered rows to a report, paste values so the evidence does not depend on formulas pointing back to the original sheet. Check the copied row numbers and counts against the source, especially after sorting or editing.
Download the report sheet through File > Download in a suitable format, such as CSV for a single sheet. The embedded check also supports downloading its evidence. Neither a count nor an export removes duplicate records; review matches and preserve a backup before making any separate cleanup decisions.
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