Abstract
Transcript
Excel formulas can contain a variety of operators. Operators tell Excel what mathematical function to perform, or what logical expression to evaluate. You'll often combine multiple operators in a single formula.
Let's take a look.
Here we have a list of operators, their names, and a sample formula for each. Let's take a quick run through the list and enter the formulas shown in column E.
Addition and subtraction use standard plus and minus symbols. So, G6 + I7 is 28, and G6 - I7 equals 14.
Notice I can type the cell references directly, or I can point and click to add the address.
For multiplication, use an asterisk: H10 * I7 is 21.
The operator for division is the forward slash: I7 / G13 is 3.5. With any of these operators, you can add extra space for readability, if you like.
For exponents, use the caret: I7 squared is entered as I7, caret, and 2.
Concatenation is an operation that joins things together. The operator for concatenation is the ampersand.
I can join the name in J13 with the number in G6 by entering: J13, ampersand, G6. Note that the result is text, as you can tell, because the result is left-aligned.
In most cases, you'd probably also add a space. The space is literal text and needs to be enclosed in double quotes. I also need to add another ampersand on the other side of the space to join it to the number.
The next six operators are logical comparison operators. This means that they evaluate a condition, and return either TRUE or FALSE. You'll often use logical operators to test for certain conditions, and then perform calculations based on the result.
For example, the formula =G6 = I7 returns FALSE.
In the next two examples, =G6 > I7 returns TRUE, and =H10 < G13 returns FALSE.
The parentheses, in this case, are just for readability.
Use the equal sign with the "greater than" or "less than" symbols to mean "or equal to".
=(G13 + 1) >= H10 returns TRUE, since G13 + 1 = 3.
and =G13 <= H10 also returns TRUE, since 2 is less than 3.
To test for inequality, use the "less than" and "greater than" operators together. This formula is read as "G13 is not equal to H10."
Note that you're free to combine operators as you like, using parentheses to control the order of operations.