Excel Operators (Table of Contents)
Introduction to Operators in Excel
Operators in Excel specifies the type of calculation to be performed on a given set of values. Obviously not restricted to numeric values only, we can use operators over different data types other than numeric (for example, Text/Character data type). Excel has a rich variety of operators to perform calculative actions on a given set of data. In this article, we will see what the different types of Excel operators are and how those can be used to make your day to day life easy.
Types of Operators in Excel
Basically, there are 4 crude types of operators in Excel, mentioned as below:
- Arithmetic Operators
- Logical/Comparison Operators
- Text Concatenation Operator
- Reference Operators
Each type consists of a set of specifically meant operators for that particular group (except Text Concatenation Operator, which has only one operator). We’ll see each of them according to the order above mentioned.
Let’s understand How Different Types of Operators work in Excel with some examples.
As the word itself suggest, Arithmetic Operators are used for arithmetic operations like addition, subtraction, multiplication, division etc. As can be guessed, this set of operators can be used for numeric calculations.
Following are the arithmetic operators available in Excel.
|+ (Addition Operator)||= A1 + B1||It makes the addition of two or more than two numeric values and gives a numeric value as a return.|
|– (Subtraction Operator)||= A1 – B1||Subtracts two or more than two numeric values and gives a numeric value in return|
|* (Multiplication Operator)||= A1 * B1||Multiplies one numeric value with the other and gives a numeric value in return|
|/ (Division Operator)||= A1 / B2||Divides the numerator(should be numeric) value with the denominator(should be numeric) value and gives a numeric value in return.|
|% (Percentage Operator)||= A1 %||Converts the number present in a cell into a percentage (i.e. divides the number by 100).|
|^ (Exponential Operator)||= A1 ^ B1||Raises the power of the first numeric value by the second numeric value.|
See below is the example of arithmetic operators in Excel:
Precedence of Arithmetic Operators:
Arithmetic operators follow the order precedence. Exponential and Percentage operators have the highest precedence and then Multiplication and Division followed by Addition and Subtraction. This means, whenever you’ll be having an expression with more than one arithmetic operator, percentage and exponentials will be evaluated first. After that, Multiplication and division will be given preference to evaluate; finally, addition and subtraction will be evaluated.
See the table below, which explains the precedence of Arithmetic Operators:
Though these operators have precedence over each other, brackets can precede some specific operators and be evaluated first.
See the below examples for the precedence of arithmetic operators:
Logical or Comparison Operators are used in excel to logically compare the two values (numeric or text). These operators compare two values (provided through cells or separately) and return a logical output, i.e. TRUE or FALSE.
See the below table, which explains logical operators.
|= (Equals To)||It compares two values and returns TRUE if both values are equal; else returns FALSE.
|=A1 = B1
|<> (Not Equals To)||It compares two values and returns TRUE if both values are not equal to each other else returns FALSE.
|=A1 <> B1|
|> (Greater Than)
|It returns TRUE if the value in cell A1 (First Value) is greater than the value in cell B1 (Second Value) else returns FALSE.
|=A1 > B1|
|< (Less Than)
|It returns TRUE if the value in cell A1 (First Value) is lesser than the value in cell B1 (Second Value); else returns FALSE.
|=A1 < B1|
|>= (Greater than or equals to)
|It returns TRUE if the value in cell A1 (First Value) is greater than or equals to the value in cell B1 (Second Value); else returns FALSE.
|=A1 >= B1|
|<= (Less than or equals to)||It returns TRUE if the value in cell A1 (First Value) is less than or equals to the value in cell B1 (Second Value); else returns FALSE.
|=A1 <= B1|
Please see below is an example for the comparison operators:
Text Concatenation Operator
Excel has one operator, which helps to join in two or more text strings and produces a single text line. We can use the ampersand (&) operator to join two or more strings and get a single text line.
See the following example:
As you can see, the ampersand operator added two strings.
Excel reference operators are used to refer to the ranges from your excel spreadsheet in a formula. Following are the reference operators:
|: (Colon)||It’s a range operator. Which gives a range of cells within start point and end point reference cells||= SUM(A2:B6) #Provides all cells as a range starting from A2 to cell B6.|
|, (Comma)||Union Operator. This operator combines (as the word union suggests) two or more than two references into a single reference.||= SUM(A2:A6, A2:B3)|
|(space)||Intersection Operator. This operator only gives reference to those cells which are common in two range arguments.||
= SUM(A2:A6 A2:B3)
Let’s take an example. Suppose below is the data you have:
In cell C2, we can see the range operator. It takes a range of all cells starting from A2 to B6 under the SUM function and returns the sum of all 10 values. See the output below.
Cell D2 of the excel spreadsheet shows the functioning of the union operator. It takes two ranges as a reference, first from column A ( A2: A6) and the other as (A2: B3) under the SUM function. Finally, it produces sum of these two references and gives a value of 56.
Please see the below image for your reference:
Cell E2 of the excel spreadsheet shows the functioning of the intersection operator. It takes two ranges as a reference, first from column A ( A2: A6) and the other as (A2: B3) under the SUM function. Finally, it produces a sum of values in the cells, which are common in both ranges (i.e. cell A2: A3), which is 7.
See the image below for your reference.
This is it about the Excel Operators.
Things to Remember About Operators in Excel
- Ensure that while you are using more than one arithmetic operator in a single expression or formula, the precedence is followed. If you want some fewer precede operators to be operated over those with high precedence, make sure you are evaluating them under brackets.
- There is precedence within the operators with the same precedence order itself. Like % has precedence over the exponential operator. Multiplication having precedence over division operator. Addition having precedence over subtraction.
- The comparison operators can be used to compare text values as well.
This has been a guide to Operators in Excel. Here we discussed Operators in Excel and Types of Operators in Excel along with practical examples and downloadable excel template. You can also go through our other suggested articles–