Microsoft Office Tutorials and References
In Depth Information
Order of Operations
Order of Operations
When a formula contains many calculations, Excel evaluates the formula
in a certain order. Rather than calculating from left to right as a calculat-
or might, Excel performs certain types of calculations, such as multiplica-
tion, before calculations such as addition.
You can override the default order of operations with parentheses. If you do
not use parentheses, Excel uses the following order of operations:
11. Unary minus is evaluated first.
22. Exponents are evaluated next.
33. Multiplication and division are handled next, in a left-to-right man-
ner.
44. Addition and subtraction are handled next, in a left-to-right manner.
Note
To see how Excel calculates the formulas you enter, first enter a
formula in a cell. Next, from the Formulas tab, select Formulas,
Formula Auditing, Evaluate Formula to open the Evaluate Formula
dialog and watch the formula calculate in slow motion.
The following sections provide some examples of order of operations.
Unary Minus Example
The unary minus is always evaluated first. Think about when you use expo-
nents to raise a number to a power. If you raise 2 to the second power, Excel
calculates ( 2) × ( 2), which is +4. Therefore, the formula = 2^2 evalu-
ates to 4.
If you raise 2 to the third power, Excel calculates ( 2) × ( 2) × ( 2). Mul-
tiplying 2 by 2 results in +4, and multiplying +4 by 2 results in 8.
Therefore, the simple formula = 2^3 generates 8.
You need to understand a subtle but important distinction. When Excel en-
counters the formula = 2^3, it evaluates the unary minus first. If you want
the exponent to happen first and then have the unary minus applied, you have
to write the formula as = (2^3). However, in a formula such as =100 2^3,
the minus sign is considered to be a subtraction operator and not a unary
Search JabSto ::

Custom Search