Excel “Not Equal” Comparison Operator: Syntax, Examples

Photo of author

By Victor Ashiedu

Published

Excel “Not Equal” is a Comparison operator that compares two values. “Not Equal” will return TRUE if the values are NOT equal. However, if the values are equal, the operator will return FALSE.

It is important to note how this operator works as it can easily be confused. A TRUE means the compared values ARE NOT EQUAL. However, a FALSE means the values are EQUAL.

This guide covers how to use Excel “Not Equal”. It also covers how “Not Equal” can be combined with other Excel functions to solve business problems.

Excel “Not Equal” Syntax

The syntax of Excel “Not Equal” is:

[value1] <> [value2]

value1: the first value to be compared
<>: Not Equal to sign
value2: the second compared value

Example 1: IF, COUNTIF and “NOT Equal”

The table below shows students scores in a particular subject. The pass mark is 60.

Excel "Not Equal" Example (IF, COUNTIF and "NOT Equal")

In this example, I will show how to combine Excel “Not Equal” with IF and COUNTIF function.

In the first part of the worksheet (column D), I used IF to determine if a student passed or failed. Here is a sample formula:

=IF(C7>=$C$3,"Pass","Fail")

The formula above compares the absolute value of C3 with what each student scores in column C. IF a student scores greater than or equal to (>=) 60 it returns “Pass”. Otherwise it returns “Fail”.

Then, Excel “Not Equal” is used to count the number of students that passed the subject. Below is the formula used:

=COUNTIF(D7:D11,"<>FAIL")

The formula counts cells D7 to D11, if the value is NOT “Fail”. The result is 3 (in cell D13).

Example 2: SUMIF and “NOT Equal”

In this example, excel will sum the numbers in a range if Not Equal to a specified value. The table below specifies list of fruits or vegetables and quantities sold.

To determine the quantity of all products sold except Oranges, use the formula below:

=SUMIF(B3:B7,"<>Oranges",C3:C7)

Excel Not Equal, “<>Oranges” is the part of the formula that tells SUMIF to sum everything in cells C3 to C7 except for Oranges. The result is 250 (cell D9)

Comparison Operators and Meaning

The table below list calculation operators that compares two values. These operators has been combined with Excel “Not Equal” operator in the examples used in this guide.

S/NOperatorWhat it MeansExampleResult
1 <> Not Equal to 1<>2TRUE
2 <= Less than or Equal to1<=2TRUE
3>=Greater than or Equal to 1>=2 FALSE
4<Less than 1<2TRUE
5>Greater than 1>2 FALSE
6=Equal to 2=1FALSE

Conclusion

Excel “Not Equal” operator is a very useful operator that returns TRUE if values compared are NOT equal. I hope I have been able to simplify how to use “Not Equal”.

I also hope you found this Itechguide helpful. Use the “Was this page helpful?” quick feedback below to share your thoughts about this guide.

Alternatively, you could use the comment form – “Leave a Reply” – at the bottom of this page.

About the Author

Photo of author

Victor Ashiedu

Victor is the founder of InfoPress Media, publishers of Ilifeguides and Itechguides. With 20+ years of experience in IT infrastructure, his expertise spans Windows, Linux, and DevOps. Explore his contributions on Itechguides.com for insightful how-to guides and product reviews.

Related Articles

Get in Touch

We're committed to writing accurate content that informs and educates. To learn more, read our Content Writing Policy, Content Review Policy, Anti-plagiarism Policy, and About Us.

However, if this content does not meet your expectations, kindly reach out to us through one of the following means:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment

Send this to a friend