NE Function in Google Sheets: Flag unequal numeric values
Learn NE in Google Sheets with explicit inputs, worked scenarios, independently checked expectations and troubleshooting.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: Flag unequal numeric values with NE. The Google NE documentation supplies the contract summarized here.
Syntax and inputs
=NE(value1, value2) requires two values and returns a logical TRUE or FALSE. For numeric inputs it has the same comparison meaning as <>. The examples deliberately use numbers, avoiding assumptions about text collation or mixed types.
Worked examples: check the boundary
| Formula | Expected result |
|---|---|
=NE(8,11) |
TRUE |
=NE(8,8) |
FALSE |
=NE(11,8) |
TRUE |
Enter each formula in a separate empty cell. The equal pair is the important control: it produces FALSE. Reversing the unequal pair still produces TRUE because inequality is symmetric; swapping the operands cannot establish which quantity is larger. These are logical outputs, not quoted text labels.
Advanced scenario: a reusable comparison column
For a reconciliation, place expected quantities 10, 20 and 30 in A2:A4 and observed quantities 10, 18 and 31 in B2:B4. Enter =NE(A2,B2) in C2 and copy through C4. Expected results are FALSE, TRUE and TRUE. A TRUE flag says the numbers differ; it does not say which number is larger or how large the difference is.
Check all three rows before applying the formula to a larger list. Name the two source columns clearly so a reader knows what a TRUE flag means. A comparison is only a test; it does not remove or repair a failing record.
Troubleshooting
- NE tests any difference, not a direction. If the rule requires one quantity to be larger, use the corresponding directional comparison instead.
- If copying flags the wrong record, inspect both row references and confirm the expected and observed quantities still belong to the same record.
- If two formatted amounts look equal but compare differently, inspect the underlying input precision before deciding whether rounding belongs in your business rule.
- Normalize imported numeric data intentionally. This guide does not establish blank, text, error or mixed-type comparison behavior.
Related work and compatibility
The operator form =A2<>B2 expresses the same documented comparison. Operator syntax may be clearer when moving a workbook between programs, but test the actual transferred formulas and values. No cross-application coercion equivalence is claimed. See IF to turn a tested condition into an explicit label.
Availability and version history
Documented in the rolling Google Sheets service. Documentation reviewed October 19, 2026; an introduction date or numbered release was not established. Examples use English function names, decimal points and comma separators; adapt separators to the sheet’s locale.
Verification scope and sources
The official reference establishes the syntax and function-specific contract. Worked values are original, independently derived expectations, not native Google Sheets observations. No account access, UI screenshot or cross-version execution was performed. Native behavior outside the documented scope remains unverified.