Does Not Equal Sign in Excel: How to Use the "Not Equal To" Operator

Excel is packed with operators that make formulas powerful — and the not equal to sign is one of the most useful yet often overlooked. Whether you're filtering data, building conditional logic, or checking values, knowing how this operator works (and when it behaves unexpectedly) makes a real difference in how accurate your spreadsheets become.

What Is the "Not Equal To" Sign in Excel?

In Excel, the not equal to operator is written as <> — a less-than symbol followed by a greater-than symbol. It means exactly what it sounds like: "this value does not equal that value."

You won't find a dedicated ≠ key on a standard keyboard that Excel recognizes in formulas. Instead, <> is Excel's built-in way of expressing inequality, and it works across nearly every formula type.

Basic syntax:

=A1<>B1 

This returns TRUE if the values in A1 and B1 are different, and FALSE if they match.

Where You'll Use <> in Excel Formulas

IF Statements

The most common use is inside an IF function, where you want to trigger an action when two values don't match:

=IF(A2<>"Completed","Follow Up","Done") 

This checks whether cell A2 contains the word "Completed." If it doesn't, the formula returns "Follow Up." If it does, it returns "Done."

COUNTIF and COUNTIFS

You can count cells that don't match a specific value:

=COUNTIF(B2:B20,"<>Cancelled") 

This counts every cell in the range that does not contain "Cancelled." The operator goes inside the quotation marks when used with COUNTIF.

SUMIF

Similarly, you can sum values based on a not-equal condition:

=SUMIF(C2:C20,"<>0",D2:D20) 

This sums the corresponding values in column D wherever column C is not zero — useful for excluding blank or placeholder entries.

Array Formulas and FILTER (Excel 365/2019+)

In newer versions of Excel, the <> operator works inside FILTER and dynamic array formulas:

=FILTER(A2:C20,B2:B20<>"Pending") 

This returns only the rows where column B doesn't say "Pending."

How <> Handles Different Data Types

This is where users often run into trouble. The not equal to operator behaves differently depending on what's being compared. 🔍

Data TypeBehavior
NumbersStraightforward comparison — 5<>3 returns TRUE
Text stringsCase-insensitive — "apple"<>"Apple" returns FALSE
Blank cellsAn empty cell is not equal to zero by default in some contexts
DatesCompared as serial numbers — formatting doesn't affect the result
Errors#N/A, #VALUE! etc. can cause unexpected results without error handling

Case sensitivity is worth noting: Excel's <> operator does not distinguish between uppercase and lowercase. If case matters in your comparison, you'd need to combine EXACT() with other logic instead.

Blank cells are another nuance. A cell that appears empty may contain a space character, a zero, or a formula returning "" — all of which behave differently when tested with <>.

Common Mistakes When Using the Not Equal To Operator

Forgetting Quote Marks Around Text

When comparing against a text string inside COUNTIF or SUMIF, the <> operator must be inside quotation marks:

=COUNTIF(A1:A10,"<>Yes") ✅ Correct =COUNTIF(A1:A10,<>Yes) ❌ Will error 

In an IF statement, however, the text goes in its own quotes separately:

=IF(A1<>"Yes","No match","Match") ✅ Correct 

Comparing Against an Empty String

To check if a cell is not blank:

=IF(A1<>"","Has value","Empty") 

Two consecutive quotation marks with nothing between them represent an empty string. This is a standard pattern for blank-checking.

Mixing Data Types Unintentionally

If one cell contains the number 5 and another contains the text "5", Excel's <> operator will return TRUE — they are not equal because they're different data types, even though they look identical. This frequently causes bugs in imported data or spreadsheets fed by external sources.

Using <> with AND, OR, and Nested Logic

The operator becomes more powerful when combined with logical functions:

=IF(AND(A2<>"",B2<>"Complete"),"Action needed","OK") 

This checks two conditions simultaneously — neither cell is blank and the status isn't "Complete" — before returning a result.

In larger dashboards or data models, chaining <> conditions inside IFS, SWITCH, or nested IF formulas is common practice for multi-layer validation. ⚙️

How Excel Version and Platform Affect Behavior

Excel's core operators like <> are consistent across versions, but where you can use them expands with newer releases:

  • Excel 2010–2016: Works in IF, COUNTIF, SUMIF, and standard formulas
  • Excel 2019: Adds support in some array contexts
  • Excel 365: Full dynamic array support — <> works natively inside FILTER, UNIQUE, and XLOOKUP comparisons
  • Excel for Mac vs. Windows: Formula behavior is identical; keyboard shortcuts and UI differ
  • Excel Online: Supports most formula usage of <> but has limitations with certain legacy array formulas

The version on your machine, and whether you're working locally or in a browser, shapes which formula patterns are available to you.

The Variables That Change How This Applies to Your Work 📊

The not equal to operator itself is simple — but how it fits into your spreadsheet depends on factors specific to your situation: the structure of your data, whether values are imported or manually entered, the Excel version you're running, and how complex your conditional logic needs to be.

Someone building a basic task tracker needs <> in a single IF formula. Someone managing a large dataset with multiple data types and dynamic outputs needs to account for type mismatches, blank-handling, and formula compatibility across their organization's software environment. Those are genuinely different problems, even though both start with the same two characters.