<< Click to Display Table of Contents >> Operators |
The following operators can be used in formulas:
Operator |
Function |
+ |
Addition (for numbers) or concatenation* (for strings) |
– |
Subtraction |
* |
Multiplication |
/ |
Division |
% |
Modulo (remainder after division) |
* | The plus sign not only adds numeric values, but also merges strings. For example, "Text"+"Maker" results in "TextMaker". |
The order of operations rule applies. Multiplication and division operators take precedence over addition and subtraction operators, thus multiplication and division are performed before addition and subtraction. 2+3*4 equals 14. The order of operations can be modified by parentheses: (2+3)*4 equals 20.
There are also comparative and logical operators, such as those required by the IF function:
Operator |
Function |
= |
Is equal? |
< > |
Is not equal? |
> |
Is greater than? |
>= |
Is greater than or equal to? |
< |
Is less than? |
<= |
Is less than or equal to? |
& |
Logical "And" |
| |
Logical "Or" (AltGr+< key on a PC keyboard) |
! |
Negation |
Some notes on comparisons
▪When comparing two strings with "=", the result is only "true" if the strings match exactly and have the same length. The cases of letters are taken into account.
"Hans"="Hans" |
is true. |
"Hans"="hans" |
is false. |
"Hans"="Hans-Peter" |
is false. |
▪If you construct a complex comparison with several "Ands" and "Ors", you should enclose the individual conditions within parentheses.