Microsoft Office Tutorials and References
In Depth Information
Chapter 12: Building formulas
Excel performs multiplication and division before addition and subtraction.
Excel calculates consecutive operators with the same level of precedence from left to
right.
Type some formulas to see how these rules apply. Select an empty cell, and type =4+12/6 .
Press Enter, and you see the value 6 . Excel first divides 12 by 6 and then adds the result
(2) to 4. Then select another empty cell, and type =(4+12)/6 . Press Enter, and you see the
value 2.666667 . This demonstrates how you can change the order of precedence by using
parentheses. The formulas in Table 12-1 contain the same values and operators, but note
the different results caused by the placement of parentheses.
TABLE 12-1 Placement of parentheses
Formula
Result
=3*6+12/4–2
19
=(3*6)+12/(4–2)
24
=3*(6+12)/4–2
11.5
=(3*6+12)/4–2
5.5
=3*(6+12/(4–2))
36
If you do not include a closing parenthesis for each opening parenthesis in a formula, Excel
displays the message “Microsoft Excel found an error in this formula” and provides a
suggested solution. If the suggestion matches what you had in mind, simply press Enter, and
Excel completes the formula for you.
When you type a closing parenthesis, Excel briefly displays the pair of parentheses in bold.
This feature is handy when you are typing a long formula and are not sure which pairs of
parentheses go together.
Note
If you are unsure of the order in which Excel will process a sequence of operators, use
parentheses even if the parentheses aren’t necessary. Parentheses also make your
formulas easier to read and interpret, which is helpful if you or someone else needs to
change them later.
Search JabSto ::




Custom Search