Table of Contents

Not Equal To

In Excel <> means not equal to. The <> operator in Excel checks if two values are not equal to each other. Let’s take a look at a few examples.

1. The formula in cell C1 below returns TRUE because the text value in cell A1 is not equal to the text value in cell B1.

Not Equal To Operator

2. The formula in cell C1 below returns FALSE because the value in cell A1 is equal to the value in cell B1.

False

3. The IF function below calculates the progress between a start and end value if the end value is not equal to an empty string (two double quotes with nothing in between) else it displays an empty string (see row 5).

If Not Equal To Empty String

Note: visit our page about the IF function for more information about this Excel function.

4. The COUNTIF function below counts the number of cells in the range A1:A5 that are not equal to “red”.

Count Cells Not Equal To Red

Note: visit our page about the COUNTIF function for more information about this Excel function.

5. The COUNTIF function below produces the exact same result. The & operator joins the ‘not equal to’ operator and the text value in cell C1.

Concatenate 'Not Equal To' Operator and Cell Value

6. The COUNTIFS function below counts the number of cells in the range A1:A5 that are not equal to “red” and not equal to “blue”.

Count Cells Not Equal To Red and Blue

Explanation: the COUNTIFS function in Excel counts cells based on two or more criteria. This COUNTIFS function has 2 range/criteria pairs.

7. The AVERAGEIF function below calculates the average of the values in the range A1:A5 that are not equal to 0.

Average Cells Not Equal To Zero

Note: in other words the AVERAGEIF function above calculates the average excluding zeros.

You can use the NOT function in Excel to change FALSE to TRUE or TRUE to FALSE. To illustrate this function consider the following example.

8. The OR function below returns TRUE if the value in cell A2 equals “USA” or “UK”.

OR function

Note: to quickly copy this formula to the other cells double-click the fill handle (see orange arrow).

9. The formula below returns TRUE if the value in cell A2 is not equal to “USA” or “UK”.

NOT function

Explanation: by adding the NOT function the logical value returned by the OR function is reversed so that a TRUE value becomes FALSE and vice versa.

Leave A Comment

Excel meets AI – Boost your productivity like never before!

At Formulas HQ, we’ve harnessed the brilliance of AI to turbocharge your Spreadsheet mastery. Say goodbye to the days of grappling with complex formulas, VBA code, and scripts. We’re here to make your work smarter, not harder.

Related Articles

The Latest on Formulas HQ Blog