You are currently viewing Mastering Excel Comparison Operators

Mastering Excel Comparison Operators

Excel is far more than a calculator. One of its greatest strengths is the ability to make decisions based on data. Whether you’re evaluating employee performance, analyzing sales figures, validating records, or building automated reports, Excel relies on comparison operators to determine whether conditions are true or false.

Many users casually refer to these as logical operators, but in Excel, the correct term is comparison operators. These operators compare values and return one of two results:

  • TRUE – the condition is met.
  • FALSE – the condition is not met.

Microsoft Excel recognizes six comparison operators:

Excel

1

= > < >= <= <>

Show more lines

It is important to note that AND, OR, and NOT are not operators. They are logical functions, and Microsoft classifies them separately from comparison operators.

In this article, you’ll learn how each comparison operator works and how they form the foundation of many Excel formulas.

Why Comparison Operators Matter in Excel

Comparison operators allow Excel to evaluate conditions and make decisions.

Imagine you’re working with employee or student data and need to answer questions such as:

  • Is this employee’s salary greater than ₦500,000?
  • Is this employee under 30 years old?
  • Does this employee belong to the Sales department?
  • Has this student scored at least 70?
  • Is this customer’s status different from “Inactive”?

Excel answers these questions using comparison operators.

For example:

Excel

1

=A2>500000

Show more lines

If A2 contains ₦600,000, the result is:

Excel

1

TRUE

Show more lines

If A2 contains ₦400,000, the result is:

Excel

1

FALSE

Show more lines

This simple ability to compare values powers many of Excel’s most useful features, including:

  • IF statements
  • Conditional formatting
  • Data validation
  • Filtering
  • Dashboard calculations
  • Performance reporting
  • COUNTIF and SUMIF formulas
  • Dynamic analysis with FILTER functions

In short, comparison operators help Excel determine what should happen next based on a condition.

6 Comparison Operators in Excel

1. Equal To (=)

The equal to (=) operator checks whether two values are exactly the same.

Example

Excel

1

=A2=B2

Show more lines

If:

Plain Text

1

A2 = 100

2

B2 = 100

Show more lines

Result:

Excel

1

TRUE

Show more lines

If:

Plain Text

1

A2 = 100

2

B2 = 150

Show more lines

Result:

Excel

1

FALSE

Show more lines

Practical Use

To determine whether a student’s score matches a required score:

Excel

1

=A2=B2

Show more lines

The operator can also compare text values:

Excel

1

=A2=”Sales”

Show more lines

This returns TRUE when A2 contains “Sales” and FALSE otherwise.

2. Greater Than (>)

The greater than (>) operator checks whether the first value is larger than the second.

Example

Excel

1

=A2>B2

Show more lines

If:

Plain Text

1

A2 = 80

2

B2 = 60

Show more lines

Result:

Excel

1

TRUE

Show more lines

If:

Plain Text

1

A2 = 50

2

B2 = 60

Show more lines

Result:

Excel

1

FALSE

Show more lines

Practical Use

To identify scores above 70:

Excel

1

=A2>70

Show more lines

  • 85 returns TRUE
  • 65 returns FALSE

This operator is ideal whenever you need to identify values that exceed a target or threshold.

3. Less Than (<)

The less than (<) operator checks whether a value is smaller than another value.

Example

Excel

1

=A2<B2

Show more lines

If:

Plain Text

1

A2 = 40

2

B2 = 60

Show more lines

Result:

Excel

1

TRUE

Show more lines

If:

Plain Text

1

A2 = 80

2

B2 = 60

Show more lines

Result:

Excel

1

FALSE

Show more lines

Practical Use

Suppose employees under age 30 qualify for a development program:

Excel

1

=A2<30

Show more lines

Excel returns TRUE whenever the employee’s age is below 30.

4. Greater Than or Equal To (>=)

The greater than or equal to (>=) operator checks whether a value is either greater than or exactly equal to another value.

Example

Excel

1

=A2>=70

Show more lines

If A2 contains:

ValueResult
80TRUE
70TRUE
65FALSE

Notice that 70 qualifies because the condition includes the boundary value.

Practical Use

If employees need a performance score of at least 70:

Excel

1

=A2>=70

Show more lines

This is usually more appropriate than:

Excel

1

=A2>70

Show more lines

because a score of exactly 70 should still qualify.

5. Less Than or Equal To (<=)

The less than or equal to (<=) operator checks whether a value is smaller than or exactly equal to another value.

Example

Excel

1

=A2<=100

Show more lines

If A2 contains:

Practical Use

Suppose a company has a spending limit of ₦1,000,000:

Excel

1

=A2<=1000000

Show more lines

Excel checks whether the amount falls within the approved budget.

6. Not Equal To (<>)

The not equal to (<>) operator checks whether two values are different.

Unlike the equal-to operator, it returns TRUE when values do not match.

Example

Excel

1

=A2<>B2

Show more lines

If:

Plain Text

1

A2 = 100

2

B2 = 200

Show more lines

Result:

Excel

1

TRUE

Show more lines

If:

Plain Text

1

A2 = 100

2

B2 = 100

Show more lines

Result:

Excel

1

FALSE

Show more lines

Practical Use

To identify customers whose status is not “Inactive”:

Excel

1

=A2<>”Inactive”

Show more lines

The formula returns TRUE for statuses such as:

  • Active
  • Pending
  • Suspended

and FALSE only when the status is “Inactive”.

Quick Reference Guide

OperatorMeaningExampleReturns TRUE When
=Equal to=A2=B2Both values are the same
Greater than=A2>B2A2 is larger than B2
Less than=A2<B2A2 is smaller than B2
>=Greater than or equal to=A2>=B2A2 is greater than or equal to B2
<=Less than or equal to=A2<=B2A2 is less than or equal to B2
<> Not equal to=A2<>B2The values are different

Using Comparison Operators Inside Excel Functions

The true power of comparison operators emerges when they are combined with Excel functions.

IF Function

Excel

1

=IF(A2>=70,”Pass”,”Fail”)

Show more lines

Excel first evaluates:

Excel

1

A2>=70

Show more lines

  • If TRUE, it returns Pass
  • If FALSE, it returns Fail

COUNTIF Function

Count values greater than 70:

Excel

1

=COUNTIF(A2:A100,”>70″)

Show more lines

SUMIF Function

Sum sales associated with values greater than ₦100,000:

Excel

1

=SUMIF(A2:A100,”>100000″,B2:B100)

Show more lines

In these examples, comparison operators act as decision-making criteria that tell Excel which records to count, sum, display, or evaluate.

An Easy Way to Remember the Operators

Think of each operator as a question you’re asking Excel:

OperatorQuestion
=Are these the same?
Is this bigger?
Is this smaller?
>=Is this bigger or the same?
<=Is this smaller or the same?
<> Are these different?

Excel answers each question with either:

Excel

1

TRUE

Show more lines

or

Excel

1

FALSE

Show more lines

Final Thoughts

Comparison operators are among the most important building blocks in Excel. While formulas calculate values, comparison operators enable Excel to think logically about those values.

Whether you’re evaluating employee performance, validating data, analyzing sales trends, filtering records, or creating interactive dashboards, these six operators help Excel determine how information should be processed.

The six comparison operators are:

Excel

1

= > < >= <= <>

Show more lines

Mastering them will make it easier to write better formulas, build smarter spreadsheets, and automate your analysis with confidence.

Important Terminology

For accuracy, remember this distinction:

  • Comparison Operators: =, >, <, >=, <=, <>
  • Logical Functions: AND(), OR(), NOT()

Understanding the difference helps build a stronger foundation for learning Excel and developing more advanced formula skills.

Conclusion: Every advanced Excel formula starts with a simple question. Comparison operators are the tools that allow Excel to answer those questions with a clear and logical TRUE or FALSE.

Leave a Reply