Duplicate detection, grouping, and report export
Google Sheets And Not Equal
Use a read-only duplicate check for google sheets and 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.
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.
Use AND with the not-equal operator <> to test multiple conditions in Google Sheets. For example, =AND(A2<>"",B2<>"Closed") returns TRUE when A2 is not blank and B2 is not Closed. Combine that test with COUNTIF when you need to identify duplicate values while excluding specific records.
Combine AND with not equal
AND returns TRUE only when every condition supplied to it is TRUE. Enter this formula in a helper column to check whether an ID exists in column A and its status in column B is not Closed:
=AND(A2<>"",B2<>"Closed")
Copy the formula down the sheet. Each row returns TRUE or FALSE; the formula does not change the data values being tested. A blank status also satisfies B2<>"Closed", so add B2<>"" if a status is required.
Test whether a number is not equal
Compare a numeric cell directly with a number, without quotation marks around the number:
=AND(A2<>"",A2<>0)
This returns TRUE when A2 is not blank and is not zero. If the column can contain text, add ISNUMBER(A2) to require a numeric value. Check the underlying value when a displayed number appears equal but the result differs: formatting can round what you see without changing the stored value.
Use not equal inside a function
Google Sheets has no separate “does not equal” command; <> is the comparison operator. In COUNTIF, the criterion is supplied as text. To count nonblank statuses other than Closed in B2:B100, use COUNTIFS:
=COUNTIFS(B2:B100,"<>Closed",B2:B100,"<>")
For a criterion stored in D1, concatenate the operator and the cell reference. This version also excludes blank statuses:
=COUNTIFS(B2:B100,"<>"&D1,B2:B100,"<>")
The ampersand builds the criterion from <> and D1. Check D1 before using it: if it is blank, the first criterion also tests for nonblank cells, rather than excluding a named status.
Find duplicates that meet both conditions
Suppose A2:A100 contains customer IDs and B2:B100 contains statuses. To flag an ID that appears more than once in the full ID range, while excluding the current row if its status is Closed, enter this in C2:
=AND(A2<>"",B2<>"Closed",COUNTIF($A$2:$A$100,A2)>1)
Fill C2 down through C100. The dollar signs keep the lookup range fixed; the relative references A2 and B2 change for each row. Filter column C for TRUE to inspect qualifying rows.
The count includes Closed rows even though those rows cannot themselves be flagged. For example, an Open row and a Closed row with the same ID give the Open row a TRUE result. If duplicates should count only among non-Closed rows, use:
=AND(A2<>"",B2<>"Closed",COUNTIFS($A$2:$A$100,A2,$B$2:$B$100,"<>Closed")>1)
Both formulas treat a blank status as not Closed. Add B2<>"" to the AND test, and add $B$2:$B$100,"<>" to COUNTIFS when blank statuses must also be excluded from the count.
Normalize the selected values
Inconsistent spaces or capitalization can obscure repeated IDs. For text identifiers in A2:A100, use a separate helper column to create a consistent comparison key:
=UPPER(TRIM(A2))
Fill the formula down, then point the duplicate formula at that helper column instead of A. Keep the original IDs for review. This normalization removes leading, trailing and repeated ordinary spaces and standardizes letter case; it does not resolve every possible character or data-type difference.
Choose the key scope before counting. A repeated customer ID can be legitimate across different orders, while the same customer and order combination may require review. For a two-column key in A and B, count both fields rather than assuming that either field alone defines a duplicate:
=AND(A2<>"",B2<>"",COUNTIFS($A$2:$A$100,A2,$B$2:$B$100,B2)>1)
This returns TRUE for every occurrence of a repeated pair, not only the second and later occurrences. Adjust the ranges to cover the same rows in your data set.
Group and count matches
A row-level flag shows where duplicates occur; a grouped count shows how many times each key occurs. With normalized keys in D2:D100, use QUERY to list keys occurring more than once:
=QUERY(D2:D100,"select D, count(D) where D is not null group by D having count(D) > 1 label count(D) 'Count'",0)
The output contains one row per repeated key and its count. It does not list source row numbers or apply a status exclusion. To group only eligible records, first filter the data using the same conditions as the row-level check, then group the resulting keys.
Inspect the report for Google Sheets AND not equal
Compare the TRUE rows with the grouped counts before deciding what each match means. A duplicate key identifies repeated data, not necessarily an incorrect record. Check associated dates, statuses and other fields against the business rule for that sheet.
To compare sheets, test whether each nonblank ID in the current sheet appears in Sheet2:
=AND(A2<>"",COUNTIF(Sheet2!$A$2:$A$100,A2)=0)
TRUE means the ID is absent from the specified range on Sheet2. This tests for a missing value, not whether matching rows have different statuses. Extend the sheet range when needed, and normalize both sides consistently before comparing text keys.
The embedded duplicate checker can inspect pasted sheet data by selected columns and return grouped counts and row indexes without changing source values. Its output can be exported for review; verify that its selected key scope matches the scope used in your formulas.
Export evidence
Preserve a traceable record before editing duplicates. Keep the original row number or a stable record ID alongside the key, status and count, particularly if you may sort or filter the sheet later.
- Filter the helper column to show TRUE rows, or copy the grouped results to a separate report sheet.
- Include the comparison ranges, normalization rule and exclusions in the report so another reviewer can reproduce the result.
- Review the matching source records, then download or share the report using your usual spreadsheet workflow.
Common mistakes include counting the full range while expecting excluded statuses to be ignored, letting a relative range shift during fill-down, and treating blank cells as meaningful IDs. Check formula separators for your spreadsheet locale if a formula produces a parse error. Recheck results after changing the source range or the definition of a duplicate.
FAQ
Does this page delete google sheets and 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