Comparison Operators in Excel

In this post, you’ll learn about comparison operators in excel and how you can use them in your Excel sheet.

What is Comparison Operators in Excel?

The comparison operators in Excel are to check if two values are equal to each other, if one value is greater than another value, if one value is less than another value, etc.

The following steps will explain the work of comparison operators in excel:

  • First, prepare an excel sheet with the required details in it.
Comparison Operators in Excel

Equal to (=)

  • The equal to operator (=) returns TRUE if two values are equal to each other.
  • To check the condition use the following formula: =A2=B2 or =IF(A2=B2,”YES”,”NO”).
Comparison Operators in Excel

Greater than (>)

  • The greater than operator (>) returns TRUE if the first value is greater than the second value.
  • To check the condition use the following formula: =A3>B3 or =OR(A3>B3).
Comparison Operators in Excel

Less than (<)

  • The less than operator (<) returns TRUE if the first value is less than the second value.
  • To check the condition use the following formula: =A4<B4 or =AND(A4<B4).
Comparison Operators in Excel

Greater than or equal to (>=)

  • The greater than or equal to operator (>=) returns TRUE if the first value is greater than or equal to the second value.
  • To check the condition use the following formula: =A5>=B5 or =COUNTIF(A2:A5,”>=20″).
Comparison Operators in Excel

Less than or equal to (<=) 

  • The less than or equal to operator (<=) returns TRUE if the first value is less than or equal to the second value.
  • To check the condition use the following formula: =A6<=B6 or =SUMIF(A2:A6,”<=20″).
Comparison Operators in Excel

Not Equal to (<>) 

  • The not equal to operator (<>) returns TRUE if two values are not equal to each other.
  • To check the condition use the following formula: =A7<>B7 or =IF(A7<>B7,”YES”,”NO”).
Comparison Operators in Excel
Copy link
Powered by Social Snap