8.2 Creating Complex Formulas
8.2 Creating Complex Formulas
Simple formulas have one mathematical operation. Complex formulas involve more than one mathematical
operation.
To calculate complex formulas correctly, you must perform certain operations before others. This is defined in
the order of operations.
The order of mathematical operations is important. If you enter a formula that contains several operations,
Excel knows to work those operations in a specific order. The order of operations is:
A mnemonic that can help you remember this is Please Excuse My Dear Aunt Sally (P.E.M.D.A.S).
Example 1
Using this order, let's see how the formula 20/(8-4)*8-2 is calculated in the following breakdown:
Example 2
3+3*2=?
Is the answer 12 or 9? Well, if you calculated in the order in which the numbers appear, 3+3*2, you'd get the
wrong answer: 12. You must follow the order of operations to get the correct answer.
Complex formulas
Before moving on, let's explore some more formulas to make sure you understand the order of operations by
which Excel calculates the answer.
Multiply 4*2 before performing the division operation because the multiplication sign comes before the
4*2/4
division sign. The answer is 2.
Divide 4 by 2 before performing the multiplication operation because the division sign comes before the
4/2*4
multiplication sign. The answer is 8.
4/(2*4) Perform the operation in parentheses (2*4) first, and divide 4 by this result. The answer is 0.5.
Multiply 2*4 before performing the subtraction operation because the multiplication sign is of a higher
4-2*4
order than the subtraction sign. The answer is -4.
Important: Press Enter, or click the Enter button on the Formula bar. This step ends the formula.
To show fewer decimal places, you can click the Decrease Decimal place command on the Home tab.
Excel will not always tell you if your formula contains an error, so it's up to you to check all of your formulas. To
learn how to do this, you can read the Double-Check Your Formulas lesson from our Excel Formulas tutorial.
Sometimes when you copy and paste a formula, you don't want one or more cell references to change.
An absolute reference solves this problem. Absolute cell references in a formula always refer to the same cell or
cell range in a formula. If a formula is copied to a different location, the absolute reference remains the same.
An absolute reference is designated in the formula by the addition of a dollar sign ($). It can precede the column
reference or the row reference, or both. Examples of absolute referencing include:
Copy the formula into H3. The new formula should read =F3*$C$2. The F2 reference changed to F3
because it is a relative reference, but C2 remained constant because you created an absolute reference
by inserting the dollar signs.
When writing a formula, you can press the F4 key on your keyboard to switch between relative and absolute
cell references. This is an easy way to quickly insert an absolute reference.
Challenge!
Use the Inventory or any Excel workbook you choose to complete this challenge.
Create at least one complex formula that uses the addition and division operations.
Create at least one complex formula that uses parentheses and a multiplication operation.
Create a formula that uses an absolute reference.