As you build a formula, keep in mind that all functions have an order of precedence shown in the following table, where level one is the highest order of precedence. Expressions with a high order of precedence are evaluated before those at lower levels. When an expression has operators of equal precedence, it is evaluated from left to right. You can use parentheses to override other precedence rules when necessary because any expression within parentheses is always evaluated first. Terms have no order of precedence because they cannot be evaluated further. Table 7.3 shows the first six levels of the order of precedence.
Level 1 |
Parentheses |
Level 2 |
Functions in the Functions lists, And, Or, Not |
Level 3 |
*, ÷, Modulo |
Level 4 |
+, - |
Level 5 |
Comparisons: <, ≤, =, ≠, ≥, >, ≤ x <, < x ≤, < x < |
Level 6 |
Logical Operators &, |, and ! |
Note: When a function has an expression as its argument, the argument has a higher order of precedence than it would if enclosed in parentheses outside the function.