Logical Operators in Excel

List of Logical Excel Operators

Logical operators in excel are also known as the comparison operators and they are used to compare two or more values, the return output given by these operators are either true or false, we get true value when the conditions match the criteria and false as a result when the conditions do not match the criteria.

Below are the most commonly used logical operators in excel –

Sr No.Logical Operator Excel SymbolOperator NameDescription
1=Equal toCompares One Value to Other Value
2>Greater ThanTests whether the value is greater than a certain value or not
3<Less ThanTests whether the value is less than a certain value or not
4>=Greater Than or Equal ToTests whether the value is greater than or equal to a certain value or not   
5<=Less Than or Equal ToTests whether the value is less than or equal to a certain value or not 
6<>Not Equal ToTests whether a particular value is not equal to a certain value or not 

Now we will look at each one them in detail.

You can download this Excel Operators Template here – Excel Operators Template

#1 Equal Sign (=) to Compare Two Values

We can use the equal sign (=) to compare one cell value against the other cell value. We can compare all types of values using an equal sign. Assume we have below values from cell A1 to B5.


Excel Logical Operators - Step 1

Now I want to test whether the value in cell A1 is equal to cell B1 value.

  1. In order to select the value of A1 to B1, let us open the formula with an equal sign.


    Excel Logical Operators - Step 2

  2. Select cell A1 now.


    Excel Logical Operators - Step 3

  3. Now type the one more logical operator symbol equal sign (=).


    Excel Logical Operators - Step 4

  4. Now select the second cell we are comparing, i.e., B2 cell.


    Excel Logical Operators - Step 5

  5. Ok, we are done. Let hit enter key to close the formula. Copy and paste it to other cells.


    Excel Logical Operators - Step 6

    So we got TRUE as the result if the cell 1 value is equal to cell 2 or else we got FALSE as a result.

#2 Greater Than (>) Sign to Compare Numerical Values

Unlike equal sign (=) greater than sign (>) can only test numerical values, not text values. For example, if your values in cell A1 to A5 and you want to test whether these values are greater than (>) the value of 40 or not.

Greater Than Step 1
  • Step 1: Open the formula in B2 cell and select the cell A2 as the cell reference.
Greater Than Step 2
  • Step 2: Since we are testing, the value is greater than mention > symbol and apply the condition as 40.
Greater Than Step 3
  • Step 3: Close the formula and apply it to remain cells.
Greater Than Step 4

Only one value is >40, i.e., cell A3 value.

In the cell A6 value is 40; since we have applied the logical operator > as the criteria formula returned, the result is FALSE. We will see how to solve this issue in the next example.

#3 Greater Than or Equal To (>=) Sign to Compare Numerical Values

In the previous example, we have seen the formula returned TRUE value only to those values which are greater than the criteria value. But if the criteria value is also to be included in the formula, then we need to use the >= symbol.

Greater Than or Equal To

The previous formula excluded the value of 40, but this formula included.

#4 Less than Sign (<) to Compare Numerical Values

Like how greater than tests the numerical values, similarly less than also tests the numbers. I have applied the formula as <40.

Less than Step 1

It works completely opposite to the greater than criteria. It has returned TRUE to all those values which are less than the value of 40.

Less than Step 2

#5 Less Than or Equal To Sign (<=) to Compare Numerical Values

Like how >= sign included the criteria value also in the formula similarly, <= also performs the same way.

Less Than or Equal To step 1

This formula included the criteria value in the formula, so the value of 40 is returned as TRUE.

Less Than or Equal To step 2

#6 Not Equal Sign (<>) to Compare Numerical Values

Combination of greater than (>) and less than (<) signs make the operator sign not equal to <>. This works completely opposite to equal sign. The equal sign (=) tests whether the one value is equal to other value and returns TRUE, whereas not equal to sign <> returns TRUE if the one value is not equal to another value and returns FALSE if the one value is equal to another one.

Not Equal Sign Step 1

As I said, A3 & B3 cell values are the same, but the formula returned FALSE, which is completely different than the EQUAL sign logical operator.

Not Equal Sign Step 2

Logical Operator in Excel with Formulas

We can also use logical operator symbols in other excel formulas IF Excel function is one of the often used formulae with logical operators.

#1 – IF with Equal Sign

If the function tests, the condition is equal to a certain value or not. If the value is equal, then we can have our own value. Below is a simple example of that.

IF with Equal Sign 1

The formula returns the Same if the cell A2 value is equal to B2 value; if not, it will return Different.

IF with Equal Sign 2

#2 – IF with Greater Than Sign

We can test certain numerical values and arrive at results if the condition is TRUE and return a different result if the condition is FALSE.

IF with Greater Than

#3 – IF with Less Than Sign

The below formula will show the logic of applying if with less than the logical operators.

IF with Less Than Sign

Things to Remember

  • Excel logical operator symbols return only TRUE or FALSE as a result.
  • Combination of > & < symbols make not equal sing <>.
  • >= & <= sign includes the criteria also in the formula.

This has been a guide to Logical Operators in Excel. Here we discuss the top 6 types of MS Excel Logical Operators along with practical examples and a downloadable excel template. You may learn more about excel from the following articles –

  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion
LEARN MORE >>