Check for Duplicates in Google Sheets
en
Run read-only duplicate check

Duplicate detection, grouping, and report export

Google Sheets If Statement Not Equal

Use a read-only duplicate check for google sheets if statement not equal 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.

Inspect duplicate groups in the selected sheet dataKeep source values unchanged during the checkExport row-level evidence for the next step
Check duplicates in pasted sheet data
Review grouped matches for google sheets if statement not equal before exporting duplicate evidence.

Report reading guide

Read duplicate results in three passes

  1. Scope: confirm selected key columns.
  2. Groups: review repeated values and counts.
  3. Rows: compare source row numbers before acting.
Key customer@example.comCount 3 matchesRows 12, 27, 41

Use <> for a Google Sheets IF statement that tests whether two values are not equal. For example, =IF(A2<>B2,"Different","Same") returns “Different” when the values in A2 and B2 differ, and “Same” otherwise. To detect duplicate values, use a count or lookup as well: <> compares values, but it does not search a range by itself.

This embedded check inspects your pasted sheet data without changing the source sheet and returns grouped counts plus row indexes for each duplicate group.

Compare values with IF and not equal

Enter a formula in an empty column beside the data, then fill it down for the remaining rows:

=IF(A2<>B2,"Different","Same")

If A2 contains Apple and B2 contains Pear, the result is “Different.” If both contain Apple, the result is “Same.” The formula compares cells on the same row; it does not check whether A2 appears elsewhere in column B.

To compare a cell with a fixed text value, put the text in double quotes: google-sheets-if-statement-not-equal

=IF(A2<>"Complete","Review","Complete")

A blank A2 also returns “Review” because a blank is not equal to Complete. If blank cells should be ignored, test for them first:

=IF(A2="","",IF(A2<>"Complete","Review","Complete"))

For a number, omit the quotation marks. For example, =IF(A2<>0,"Nonzero","Zero") tests A2 against numeric zero. Store numbers consistently as numbers when the comparison depends on numeric values.

Check duplicate values in a selected range

A duplicate check asks whether a value occurs more than once, not whether it differs from the value beside it. Suppose column A contains IDs, with a header in A1 and records in A2:A100. Enter this formula in B2 and fill it down: google-sheets-if-does-not-equal

=IF(A2="","",IF(COUNTIF($A$2:$A$100,A2)>1,"Duplicate","Unique"))

COUNTIF counts occurrences of the current ID in the fixed cell range. The dollar signs keep the search range unchanged as the formula is copied. Both occurrences of a repeated ID receive “Duplicate”; blanks return an empty result.

To label only the second and later occurrences, expand the counted range from the first data row to the current row:

=IF(A2="","",IF(COUNTIF($A$2:A2,A2)>1,"Repeated","First occurrence"))

Keep the formula outside the range it checks. Extend $A$100 if the data set grows, or new rows will not be included in the first count. Review repeated IDs before deciding whether they represent errors; multiple records can legitimately share a key. google-sheets-not-equal-int

Normalize the selected values

Extra spaces and inconsistent capitalization can make a comparison harder to interpret. If those differences should not distinguish IDs, create a helper column in C2 and fill it down:

=IF(A2="","",LOWER(TRIM(A2)))

Use the helper values as the key for counting, while retaining the original column for review. TRIM removes leading and trailing spaces and reduces repeated regular spaces; LOWER converts text to lowercase. Neither operation decides whether two similar-looking IDs belong to the same record.

Normalization can also hide meaningful distinctions. Do not remove spaces or change capitalization when those characters are significant in your identifiers. Check unusual whitespace and imported data types separately rather than assuming this formula resolves every formatting difference. google-sheets-does-not-equal-formula

Run the check while you work through the normalization steps to validate that trimmed lowercase keys match what the pivot table will group.

Group and count matches

For a compact report, select the normalized keys in column C and use a pivot table. Create it with Insert > Pivot table, add the key field under Rows, and add the same field under Values with COUNTA as the summary. Counts greater than one identify repeated keys; the source rows remain available for inspection.

Alternatively, count each normalized key beside its source row:

=IF(C2="","",COUNTIF($C$2:$C$100,C2))

Fill the formula down, then filter the count column for values greater than one. This view repeats the group count on each matching record, which makes it easier to inspect the associated fields. Exclude blank keys if they do not represent records to group. google-sheets-formula-is-not-equal-to

Compare ranges or sheets

For row-by-row comparison across sheets, reference the corresponding cell on the other sheet:

=IF(A2<>'Sheet 2'!A2,"Different","Same")

This compares A2 on the current sheet with A2 on Sheet 2. It works only when the rows are aligned: an insertion or different sort order can make unrelated records appear different. Check a stable ID before interpreting a row comparison as a record-level mismatch.

To check whether an ID exists anywhere in another sheet range, use COUNTIF instead:

=IF(A2="","",IF(COUNTIF('Sheet 2'!$A$2:$A$100,A2)=0,"Missing","Found"))

“Found” means at least one matching ID exists; it does not prove that the other fields match or that the ID is unique. Run a duplicate count on the lookup range if repeated IDs would affect your review. Adjust the sheet name and range to match your spreadsheet.

Inspect the report

Check the scope before interpreting results. Confirm that the header row is excluded, the full intended sheet range is included, and the selected key represents the entity you want to compare. A duplicate in an email column, for example, is not necessarily a duplicate of the entire row.

Review each group against its source records. Compare related fields and row positions, especially when normalized values match but original values differ. A count shows how many keys match within the selected range; it does not establish which record is correct or whether any record should be deleted. filter-does-not-equal-google-sheets

The embedded duplicate check can inspect pasted sheet data using selected key columns and return grouped counts and row indexes without changing the source. Match those indexes back to the data you supplied, especially if you pasted only part of a sheet or included a header.

Export evidence

Keep a reviewable record before making changes. In Google Sheets, filter the helper count column to show counts greater than one, copy the relevant rows and headers to a separate sheet, and include the key and count in that report. Add the original sheet row number in a helper column before copying if you need to trace each record back:

=ROW()
Before cleaning anything up, download the exported evidence so you can trace each flagged row back to the original sheet.

The embedded check also supports downloading duplicate evidence. Verify that the exported scope, keys and row indexes correspond to the records reviewed. Neither a formula label nor a read-only report removes duplicates; any cleanup is a separate decision that should follow inspection.

FAQ

Does this page delete google sheets if statement not equal?

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

Run read-only duplicate check