NOT EQUAL TO Operator (<> or !=) - Excel


Overview


The Not equal to operator (<> or !=) in Excel is a useful tool for comparing two values. This operator allows users to check if one value is not equal to another.

Syntax:

=expression1 <> expression2

expression1 and expression2 can be cell references, values, or more complex expressions.


Example: TRUE value


In this example, the Not equal to operator is comparing two different values and returns a TRUE result. Cell C2 equals "apple” and cell D2 equals "banana” so the Not equal to operator returns a TRUE value because they are not identical.

An example of the NOT EQUAL TO operator in Excel with a TRUE value output

Example:

=C2 <> D2


Example: FALSE value


In this example, the Not equal to operator is comparing two different values and returns a FALSE result. Cell C2 equals "apple” and cell D2 equals "apple” so the Not equal to operator returns a FALSE value because they are identical.

An example of the NOT EQUAL TO operator in Excel with a FALSE value output

Example:

=C2 <> D2