Understanding parenthesis in formulas:
- How do you know when you need parenthesis?
- Why do some formulas need parenthesis and others don't?
- What difference do parenthesis make?
In order to understand parenthesis in formulas, we need to know the order of precedence or order of operation.
Order
of Precedence
- Negation (negative values, i.e., -1)
- Percent
- Exponentiation
- Multiplication and Division
- Addition and Subtraction
- Text Concatenation (connects two strings of text)
- Comparison (= < >
<= >= <>)
Based on the order of precedence, you might say Excel considers multiplication and division more important than addition and subtraction because Excel will always multiply and divide before it adds and subtracts.
If you want Excel to add or subtract before it multiplies or divides you must use parenthesis.
How do you know when a formula needs parenthesis?
A formula needs parenthesis if it contains operators with different precedence.
Solve this equation using the order of precedence.
= 1 * 2 - 3 / 4 + 5
= 1 *
2 - 3 / 4 + 5
= (1 * 2)
- ( 3 / 4) + 5
=
2 -
.7 5 + 5
=
1.25 +
5
=
6.25
This formula combines multiplication and addition and therefore needs parenthesis.
=A5+(C10*B13)/D9-(E11/F8)
On the other hand, if a formula contains only operators with the same precedence, parenthesis are not required. Here are two such formulas.
- This formula multiplies and divides only. =A5/C10*B13/D9*E11/F8
- This formula adds and subtracts only. =A5+C10-B13+D9-E11+F8
Another reason to include parenthesis is they make formulas easier to read. Which formula is easier to read?
1 * 2 - 3 / 4 + 5
or
(1 * 2) - ( 3 / 4) + 5