Duplicate detection, grouping, and report export
Google Sheets If One Cell Does Not Equal Another
Use a read-only duplicate check for google sheets if one cell does not equal another 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 test if one cell does not equal another in Google Sheets, enter =A2<>B2 in an empty cell. The formula returns TRUE when the values differ and FALSE when they match. Use IF around the comparison when you need a readable status instead of a Boolean result.
Compare two cells with IF
For a row-by-row comparison, place this formula in C2:
=IF(A2<>B2,"Different","Match")
Copy it down alongside the data. If A2 contains Apple and B2 contains Orange, C2 returns Different. If both contain Apple, it returns Match. The <> operator means “not equal”; the two text arguments tell IF what to return for each outcome.
To compare every row with one fixed reference cell, lock that reference with dollar signs:
=IF(A2<>$B$2,"Different","Match")
When copied down, A2 changes to A3, A4, and so on, while $B$2 stays fixed. Use this pattern when each item must be checked against one expected value. Without the dollar signs, both references move as the formula is copied.
Decide how to handle blanks
Two empty cells compare as equal, but an empty cell and a populated cell compare as different. To report differences only when both cells contain a value, use:
=IF(OR(A2="",B2=""),"Incomplete",IF(A2<>B2,"Different","Match"))
This treats a formula returning an empty string as blank too. If missing values are meaningful differences in your data set, use the simpler comparison instead. A genuinely empty cell and a formula that returns "" may need separate checks if their distinction matters.
Check several references
To flag A2 when it differs from every value in B2, C2, and D2, combine comparisons with AND:
=IF(AND(A2<>B2,A2<>C2,A2<>D2),"Different from all","Matches at least one")
Use OR instead when the question is whether A2 differs from at least one reference:
=IF(OR(A2<>B2,A2<>C2,A2<>D2),"At least one difference","All match")
These tests answer different questions. If A2 matches B2 but differs from C2, the first formula does not flag it as different from all; the second flags a difference. Blank references also participate, so add a blank rule when empty cells should be ignored.
Compare ranges and sheets
A copied-down formula compares corresponding rows, not membership anywhere in another column. For example, A2 and B2 may differ even though the value in A2 appears in B10. Choose the comparison based on whether row position matters. google sheets cell not equal to formatting
To compare corresponding cells on two tabs, enter this on the first sheet and copy down:
=IF(A2<>'Sheet 2'!A2,"Different","Match")
Replace Sheet 2 with the actual tab name. Align the records first: if one sheet is sorted differently, the formula can report differences between unrelated records. A stable ID helps verify that each row refers to the same item.
To check whether A2 occurs anywhere in B2:B100, use an exact equality test across the range:
=IF(A2="","",IF(SUMPRODUCT(--(B$2:B$100=A2))=0,"Missing from B","Found in B"))
Copy it down column A. The dollar signs keep the lookup range fixed, and the outer IF skips empty A cells. This finds a value anywhere in the specified sheet range; it does not identify which occurrence corresponds to the current row. It is not an approximate match, and values outside row 100 are not checked.
To compare both lists for missing values, repeat the test in the opposite direction, swapping A and B. A value can be found in both lists while appearing a different number of times, so membership alone does not establish that duplicate counts match. google sheets cell equal cells value not formula
Normalize and check duplicate values
Duplicate detection answers a different question from A2<>B2: it finds repeated values within a selected range. Use it when mismatches may be caused by repeated IDs or inconsistent entries, then investigate the affected rows before changing source data.
Normalize the selected values
Extra spaces, inconsistent capitalization, and numbers stored as text can affect comparisons or grouping. Inspect the original values before applying a cleanup rule; removing characters or changing data types can merge distinct identifiers.
For text in A2, a helper column can trim ordinary leading and trailing spaces, collapse repeated internal spaces, and standardize case:
=LOWER(TRIM(A2))
Copy the formula down and compare or group the helper values. Keep the original column so you can see what changed. TRIM does not remove every possible whitespace character, and this text-oriented normalization may be inappropriate for case-sensitive identifiers or values where spacing matters.
For a case-sensitive comparison, use EXACT rather than relying on <>: duplicate data in google sheets
=IF(EXACT(A2,B2),"Exact match","Different")
This distinguishes IDa from IDA. Check that both cells use the intended data type and formatting before deciding whether a difference is an error.
Group and count matches
To count occurrences of each nonblank normalized value in C2:C100, enter this in D2 and copy down:
=IF(C2="","",COUNTIF($C$2:$C$100,C2))
A count greater than 1 identifies a repeated value; the count appears beside every occurrence. This example assumes plain text keys without wildcard characters. COUNTIF treats * and ? as wildcards in criteria, so literal wildcard characters need escaping if they occur in keys.
For one summary row per normalized value, use QUERY in an empty area:
=QUERY(C2:C100,"select C, count(C) where C is not null group by C having count(C) > 1 label count(C) 'Count'",0)
The result lists duplicate groups and their counts, not the original row numbers. Mixed data types can affect QUERY results, so use a consistent helper column and verify suspicious groups against the source. Extend the range when records fall outside row 100. google sheets no duplicates in column
Inspect the report and export evidence
Review each duplicate group against its source rows before treating it as a problem. Repeated values may be legitimate, such as multiple transactions for one customer. Conversely, a unique ID can still be paired with an incorrect value in another column.
- Confirm the checked range includes the intended records and excludes headers.
- Check whether grouping uses raw or normalized values and whether blanks belong in the analysis.
- Inspect duplicate counts alongside the original values and relevant row numbers.
- Compare corresponding records or IDs to decide whether each difference needs correction.
A helper column containing =ROW() can preserve visible source row numbers in a copied evidence table; copy and paste its results as values before sorting or moving that table. Filter views can help inspect flagged rows without changing the underlying values, but filters do not themselves establish whether a record is wrong.
The embedded read-only duplicate check can group selected pasted data and provide counts and row indexes for inspection. Its evidence can be exported; verify that reported indexes correspond to the source rows you intend to review, especially if the pasted selection excludes a header or starts below row 1.
For a manual evidence export, copy the relevant IDs, source row numbers, original values, comparison statuses, and duplicate counts to a separate sheet. Paste values when you need a fixed snapshot, then use Google Sheets’ download options for the required format. Review the exported file for scope and sensitive data before sharing it; neither a mismatch nor a duplicate count is proof that a row should be deleted.
FAQ
Does this page delete google sheets if one cell does not equal another?
No, it returns a read-only duplicate report.
What do I do with this tool?
Paste data for google sheets if one cell does not equal another; 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