# Logical Operators in Excel Article byExcelMojo Team ## What Are Logical Operators In Excel?

The Logical Operators in Excel are used to compare multiple cell values in a given dataset. The values can be numeric, text, or strings. The result will always be TRUE or FALSE, respectively, if the given Logical Operators fulfill the condition or not.

### List Of Logical Operators In Excel

The Logical Operators in Excel are given below in the table, along with its symbol and description.

Let us consider each Logical Operator with specific examples.

#### Operator #1 – Equal to (=) to compare two values

The succeeding example depicts the values, and we will calculate the result of the given values using the Equal to (=) to compare two values.

In the table, the data is,

• Column A contains Value 1.
• Column B contains Value 2.
• Column C displays the Output.

The steps to calculate the value using the Equal to (=) operator are as follows:

1: Select cell C2, and enter the formula =A2=B2.

2: Press the “Enter” key. The result is ‘TRUE’, as shown below.

3: Drag the formula from cell C2 to C6 using the excel fill handle. The output is shown below.

#### Operator #2 – Not Equal to (<>) to compare two values

The succeeding example depicts the values, and we will calculate the result of the given values using the Not Equal to (<>) to compare two values.

In the table, the data is,

• Column A contains Value 1.
• Column B contains Value 2.
• Column C displays the Output.

The steps to calculate the value using the Not Equal to (<>) operator are as follows:

1: Select cell C2, and enter the formula =A2<>B2.

2: Press the “Enter” key. The result is ‘TRUE’, as shown below.

3: Drag the formula from cell C2 to C5 using the fill handle. The output is shown below.

#### Operator #3 – Greater than (>) to compare two values

The succeeding example depicts the values, and we will calculate the result of the given values using the Greater than (>) to compare two values.

In the table, the data is,

• Column A contains Value 1.
• Column B contains Value 2.
• Column C displays the Output.

The steps to calculate the value using the Greater than (>) operator are as follows:

1: Select cell C2, and enter the formula =A2>B2.

2: Press the “Enter” key. The result is ‘TRUE’, as shown below.

3: Drag the formula from cell C2 to C5 using the fill handle. The output is shown below.

#### Operator #4 – Less than (<) to compare two values

The succeeding example depicts the values, and we will calculate the result of the given values using the Less than (<) to compare two values.

In the table, the data is,

• Column A contains Value 1.
• Column B contains Value 2.
• Column C displays the Output.

The steps to calculate the value using the Less than (<) operator are as follows:

1: Select cell C2, and enter the formula =A2<B2.

2: Press the “Enter” key. The result is ‘TRUE’, as shown below.

3: Drag the formula from cell C2 to C5 using the fill handle. The output is shown below.

#### Operator #5 – Greater than Equal to (>=) to compare two values

The succeeding example depicts the values, and we will calculate the result of the given values using the Greater than Equal to (>=) to compare two values.

In the table, the data is,

• Column A contains Value 1.
• Column B contains Value 2.
• Column C displays the Output.

The steps to calculate the value using the Greater than Equal to (>=) operator are as follows:

1: Select cell C2, and enter the formula =A2>=B2.

2: Press the “Enter” key. The result is ‘TRUE’, as shown below.

3: Drag the formula from cell C2 to C5 using the fill handle. The output is shown below.

#### Operator #6 – Less than Equal to (<=) to compare two values

The succeeding example depicts the values, and we will calculate the result of the given values using the Less than Equal to (<=) to compare two values.

In the table, the data is,

• Column A contains Value 1.
• Column B contains Value 2.
• Column C displays the Output.

The steps to calculate the value using the Less than Equal to (<=) operator are as follows:

1: Select cell C2, and enter the formula =A2<=B2.

2: Press the “Enter” key. The result is ‘TRUE’, as shown below.

3: Drag the formula from cell C2 to C5 using the fill handle. The output is shown below.

### Logical Operators in Excel with IF Function

We can also use the IF function with the Logical Operators, as shown in the examples below.

#### Example #1

The succeeding example depicts the values, and we will calculate the result of the given values using the Excel IF function with the Greater than equal to Operator.

In the table, the data is,

• Column A contains Value 1.
• Column B contains Value 2.
• Column C displays the Output.

The procedure to calculate using the IF() and Greater than equal to Operator are as follows:

• Select cell C2,
• Enter the formula =IF(A2>=B2,TRUE,FALSE),
• Press the “Enter” key, and
• Drag the formula from cell C2 to C5 using the fill handle.

The output is shown above.

#### Example #2

The succeeding example depicts the values, and we will calculate the result of the given values using the Excel IF function with the Less than Operator in Excel.

In the table, the data is,

• Column A contains Value 1.
• Column B contains Value 2.
• Column C displays the Output.

The procedure to calculate using the IF() and the Less than operator are as follows:

• Select cell C2,
• Enter the formula =IF(A2<B2,TRUE,FALSE),
• Press the “Enter” key, and
• Drag the formula from cell C2 to C5 using the fill handle.

The output is shown above.