How to Use “Does Not Equal” in Excel
(Easy Solution)

Half of the work in Excel is about comparing data across different cells. And to compare data, to see if a data point is greater than, lesser than, equal to, or not equal to another data point – we need logical operators.

While you have heard about the rest of them, the “does not equal” operator also exists in Microsoft Excel, and using it can make so many of your tasks easier than before 🙌

This guide is dedicated to everything about the “does not equal” operator. What is it, how does it work, and how can you use it together with other functions to optimize your Excel jobs – all of this is covered below.

Grab your free practice workbook for this guide here, and let’s dive in.

What is a “Does Not Equal” Operator and its functioning

“Does not Equal” is a logical operator out of the six logical operators of Excel 👇

  • “=”: Equals to
  • “<“: Less than
  • “>”: Greater than
  • “<>”: Does not equal to
  • “>=”: Greater than or equal to
  • “<=”: Lesser than or equal to
  • It is denoted by a lesser than and a greater than operator inverted towards each other as “<>”. As the name tells, this operator checks if two values are not equal.

It is a Boolean operator that runs a logical test, and the answer can be a Boolean Value i.e., True (1) or False (0). If the two given values are not equal, this operator with return TRUE. And if they are equal, it will return FALSE.

Here’s a quick example of how it works in Excel:

Does not equal operator works

The “Does not equal” operator works just the like the NOT function and exactly opposite to how the “equal sign” operator does.

Kasper Langmann, co-founder of Spreadsheeto

More examples of how it works with different values and functions come next ⏭

How to use the “Does Not Equal” operator in Excel

You’d be fascinated to see how the “Does not Equal” operator is used in Excel.

Ready to explore plenty of examples of the same? Let’s go.

With numbers

Below are two columns of numbers.

Columns of numbers

Step 1) Run the “does not equal” text on numbers input in cells by writing the formula below.

Click to copy
Does not equal numbers

Since both the cells contain 100 and are equal, the “does not equal” test returns FALSE.

Step 2) Drag the same formula down the whole list to have the same checked for all numbers.

All lists of numeric values

We get TRUE for instances where the numbers are different and FALSE for where the numbers are equal to each other 🚀

This is the simplest application of the “does not equal” operator.

Step 3) Taking it a step ahead, instead of using cell references, you can also hardcode formulas with the “does not equal” operator like the following formula:

Click to copy
hardcoding excel formulas syntax

On one side of the logical operator, we have a cell value (100). On the other side, there is a formula (50+50) that equates to 100. The operator runs fine and rightly returns FALSE.

And not only formulas, but these can also be functions too. For instance:

Step 4) Write the SUM function on one side of the “does not equal operator” with a formula on the other end as below.

Click to copy
Comparison operators with function

Easy maths – 90 is not equal to 0 so the “does not equal” test is TRUE.

Playing around with this operator together with numbers is not only helpful but interesting too. You can use any combination of functions and formulas on either side to run a non-equality test.

With text values

Step 1) To check if two text values are not equal, use the “does not equal” operator as follows:

Click to copy
Does not equal logical values

Since both the texts are the same, the logical test to see if the text in A2 does not equal the text in B2 fails, and we get FALSE 🚩

The text “Apple” in Cell A2 has a capital “A” whereas the text in Cell B2 has all letters in small. However, the “does not equal” operator doesn’t highlight it as a difference. This tells that the “does not equal” operator is case insensitive.

Kasper Langmann, co-founder of Spreadsheeto

Step 2) Drag the formula down the whole list to see if it works equally well for the remaining text values, too.

Not equal to operator for the whole list

Cool! The results seem accurate to me throughout.

This is how you use this operator with text in cells. But if you want to hardcode a text string in your formula, must enclose it in double quotation marks as below.

Click to copy
text hardcoded in the formula

Since both the text values are different and not equal to each other, the logical text turns out TRUE.

With Logical functions (IF, SUMIF, and COUNTIF)

The real utility of the “does not operator” lies within using it with other functions 🧐

In the following example, I have a set of people from different regions.

People and their region

Based on this data, I want to populate a column that confirms if they are not from Europe.

Step 1) Write the IF function with the “does not equal” operator to check this as follows:

Click to copy
IF formula for checking if from Europe

We have specified the logical test that checks if the text value in Cell B2 is not equal to “Europe”

It will accordingly return, the value_if_true (Not from Europe) or the value_if_false (From Europe).

IF function works

Step 2) Hit Enter to see how it works.

Excel IF function results

Step 3) Use the fill handle to drag this down to the whole list and have your data sorted in seconds.

The application of this operator is even better with the SUMIF function.

For example, I have a list of some orders here 🛒

List of orders

Next to the orders is their status. We can consider all orders as sold except for those that are not yet confirmed. So how much are the total sales? To find that:

Step 1) Write the SUMIF function as follows;

Click to copy
SUMIF function

This tells Excel to check the cell range C2:C7 for the text value “Not Confirmed”.

Based on this, the only sum-up sums from the corresponding cell range of B2:B7 are the parallel cells from Column C that do not equal the text value “Not Confirmed”.

Step 2) Hit enter to see the total sales summed up based on the criteria supplied above.

Sum of sales

Wow! Excel only sums up the sales for those orders that are not in the “Not Confirmed” category.

Just like the SUMIF function, you can also use the “does not equal” operator with the COUNTIF function.

For example, let’s use it to count the number of orders other than those that are not confirmed 🔢

Step 1) Write the COUNTIF function as follows;

Click to copy
Use Excel COUNTIF function

This tells Excel to check the cell range C2:C7 for the text value “Not Confirmed” and only count those cells that do not equal the text value “Not Confirmed”.

Step 2) Hit enter to see the count of orders based on the criteria supplied in the above formula.

Count of orders

And as we can see, 4 orders are confirmed.

You can use this Boolean operator with a variety of other logical functions that run multiple criteria, too (like the COUNTIFS, SUMIFS, AND, OR function etc.) – the results will always be as good as above 🤩


Like all other operators, the “does not equal” operator can be used to perform quick logical tests by itself. And if you combine it with other functions, the possibilities are endless.

If you enjoyed learning about this logical operator, I recommend you read my following Excel tutorials on similar logical operators/functions, too ✌