×

Operators in Excel

In MS Excel, operators are used to defining the operation you want to perform on the used elements or between variables. There are four types of operators: Arithmetic operators, Comparison operators, Text concatenation operators, and Reference operators. Comparison operators are most used after arithmetic operators while working in MS excel.

Let’s dive deep into the types of the comparison operator.

1. Equal sign

The "=" sign checks whether the two values are equal. Let’s consider the below-stated example.

Operators in Excel

STEP 1: Introduce two values in two cells

You have two values, namely a & b. you have to store that in a cell (also known as) memory space. Allocate them a cell name, namely A1 & B1.

STEP 2: Select a cell

Now you have to decide the operation to be performed and fix a cell to display the result. Let’s fix it as C1.

STEP 3: Enter the formula

  • Enter the formula as =A1=B1. Every operation always starts with the '=' sign.
  • Now, if the value compared is equal to each other, the result will be displayed as "TRUE", and if they are different, the result will be displayed as "FALSE".

2. IF FUNCTION

 Not only numerical values but both the text and numerical values can also be compared and checked for results.

Following is the illustration of the IF functions.

Operators in Excel
  • The above image shows that both the numerical value and the textual content can be checked in "IF “conditions.
  • The general format for the if the condition is "=IF(VALUE1=VALUE2, "Yes", "No")
  •  On the 3rd value, we took both the text and a numerical value such as "ABC" and 32, respectively.
  • In the 4th column, we took just the textual content as "red" and "red", which, when compared, is equal and gives the result YES.

3. LESS THAN OPERATOR

When used, the less than the operator gives the value "TRUE" if the first value is lesser than the second value.

Let’s look into the below picture to understand better.

Operators in Excel
  • As the value in cell A1 is lesser than B1, the result is TRUE or else it will be FALSE.
  • The complex comparisons can be made by AND operator. If in the given two values, you have to check both the value with a variable value, i.e. (your value that could be changed) AND operator is used.
  • The syntax for AND operator is =AND (value1<40, value2<30). Here the variables are 40 and 30, respectively. If both the conditions satisfy the result will be "TRUE", or else it will be "FALSE."
Operators in Excel
  • On the first Colum, the values are 67 and 23, respectively. Even though the condition (23 <40) is satisfied, the result would be FALSE because the other state failed. Both the conditions need to be TRUE for an AND operator.

4. GREATER THAN OPERATOR

This operator gives the value “TRUE “if the first value exceeds the second value.

Operators in Excel

In the above table, column two has 12 and 23, respectively. The outcome is FALSE because the condition =A2>B2 is not satisfied.

5. OR FUNCTION

The OR condition gives the value TRUE even if one condition is satisfied, and the result will be false if both conditions fail. The illustrated OR FUNCTION is given below.

Operators in Excel

In column 3rd, the values 12 and 13 both fail the condition "=OR (A3>20, B3>20), So the result is FALSE.

6. GREATER THAN OR EQUAL TO

The operator ">=" give output as TRUE if the first value is greater or equal to the second value. And otherwise, the work will be FALSE.

Operators in Excel

In the 3rd column, both the values are the same hence TRUE, whereas, in the 2nd column, the condition fails to give the output as FALSE.

7. COUNTIF FUNCTION

The countif function counts the number of cells on the given condition. Let’s take a condition of =COUNTIF (B1:B7,”>=5”)

On the given above condition, the cells are taken from B1 TO B7, and the condition is checked in between those cells.

Operators in Excel

The result is displayed in the B 8th cell as 3. The condition is satisfied by cells B1 and B2 B3, respectively.

8. LESS THAN OR EQUAL TO

  The less than or equal to function gives the value TRUE if the first value is less than or equal to the second value. The syntax used is “<=”.

Operators in Excel

Since the value A1 is lesser than B1, the result is TRUE.

SUMIF function in less than or equal to is illustrated below

Operators in Excel

The sum of the column from A1 TO A5, excluding A5, is 62.

9. NOT EQUAL TO

The not equal to operator gives the value TRUE if both the values are not similar.

Operators in Excel

The two values shouldn’t be equal. Hence the 2nd column has the same values the output is FALSE.

Using of IF function with not equal to operator

Operators in Excel

On the above workout the syntax used is =IF (A1<>B1,"1","2"). If the condition satisfies, it will print the first value "1", or else it will print “2”.

CONCLUSION

These are the various comparison operators in existence. Even though it appears complex when a function and operator are combined, understanding the essential functions of AND OR IF is sufficient to perform comparison operations. It is widely by large organization for calculation.


Related Topics

Excel EXACT() Function

The EXACT() function in excel checks whether the specified values (texts, numbers) are exactly the same or not. It returns a Boolean value TRUE if the compared values are same, else it...

1 minute read.

Insert Row in Excel

It was known that we have various multiple ways that are extremely helpful in inserting a particular row in the Microsoft Excel. And we have lots of shortcut options available...

6 minutes read.

Excel COUNTA() Function

Excel COUNTA() Function The COUNTA() function counts the number of cells in a range that are not empty. Syntax COUNTA([value1], [value [2], ...) Parameter value1(required)- This parameter represents the first cell in the range. value2, …(optional)- It represents...

1 minute read.

How to use Index and Match in Excel?

The Index and Match function is a familiar and frequently used function in Excel. It is one of the most powerful functions and is easy to use. By default, Excel...

6 minutes read.

Conditional Formatting in Excel

Conditional Formatting What are the conditional formats? Conditional Formatting is a tool that allows the user to format cells or range of cells based on the selected condition or given criteria. The formatting will...

4 minutes read.

Excel WORKDAY() Function

Excel WORKDAY() Function The WORKDAY() function in excel returns the serial number of the date before or after a specified number of workdays. Syntax WORKDAY (START_DAY, DAYS, [HOLIDAYS]) Parameter START_DAY (required)- This parameter represents the...

1 minute read.

Excel COUNT() Function

Excel COUNT() Function The COUNT() function counts the number of cells in a range that contain numbers. Syntax COUNT([value1], [value [2], ...) Parameter value1(required)- This parameter represents the first cell in the range. value2, …(optional)- It represents the...

1 minute read.

Calculating Age in Excel

Microsoft Excel provides separate functions for various mathematical operations. Nowadays, Microsoft Excel is widely used by large and various organizations. Using formulas one can calculate the statistical functions quickly and...

2 minutes read.

Reverse List in Excel

What is Reverse list in Excel? Microsoft Excel is widely used for calculation purposes like statistical and analytical for predicting and getting the result. Sometimes for calculation purposes, the user needs...

5 minutes read.

Excel WEEKDAY() Function

The WEEKDAY () function in excel returns number from 1 (Sunday) to 7 (Saturday) identifying the day of the week based on its date. This function Default return is - Sunday would be...

1 minute read.

Excel Themes

Microsoft Excel contains various features to enhance the appearance of the worksheet like text color, font size and general outlook of the objects. The users are provided with multiple theme...

3 minutes read.

Excel Ribbon Toolbar

Excel Ribbon/Toolbar How does a toolbar look like? The top section of an excel file is called a Ribbon or a toolbar. It has various commands which can be useful for us in our daily work....

6 minutes read.

Auto Fill and Flash fill

Fill Features Excel provides an amazing feature to fill the data automatically, if the available data is present in the form of any pattern. Instead of entering your data manually, you can use...

3 minutes read.

Calculating the Last Day of the Month in Excel

In Microsoft Excel, various functions exist to calculate the date and time from the current date to the past and future. Among multiple tasks in this tutorial, let's see how...

3 minutes read.

Excel INDEX () Function

Excel INDEX () Function The INDEX() function in excel returns a value from a list of tables based on the intersection of a row and a column position. This function is used with the...

2 minutes read.

Division in Excel

Excel worksheet are widely used for calculation purposes. Mathematics calculations include addition, subtraction, multiplication, division etc. Performing this calculation manually takes time and sometimes leads to error. To get the...

5 minutes read.

Excel WORKDAY.INTL() Function

Excel WORKDAY.INTL() Function The WORKDAY.INTL() function in excel returns a date before or after a specified number of workdays with custom weekend parameter. Syntax WORKDAY.INTL (START_DAY, DAYS,[WEEKEND],[HOLIDAYS]) Parameter START_DAY (required)- This parameter represents the initial date...

2 minutes read.

Spell Check in Excel

Spell Check in Excel Microsoft Excel facilities the complete features for examining the work with text. It provides the basic properties for the proper functioning of text, including the spell-check property. The...

5 minutes read.

Shortcut Keys in Excel

Shortcut Keys in Excel Shortcut keys in Excel are used to simplify the work and save time by pressing a few keys.  These keys are used for navigating and working with Excel spreadsheets quickly and easily. Basic Selection:...

9 minutes read.

Check Marks in Excel

What is a Check Mark? Among various characters checkmark is one of the characters used to indicate that the item or product in the list is correct, chosen or selected. A...

5 minutes read.