Wouldn't it be valuable if all of your team members could at least interpret any simple excel formulas they encounter?
In a previous post I explained how to build a simple formula and view a formula. Today, I want to cover how to build and interpret a formula using more than one operator (+, -, *, /). This can be challenging especially if you are not familiar with the order of operations, which dictates how calculations are performed.
By the way, I'm a certified Excel instructor. If you like this post, please consider taking a class with me!
In the following example, I am looking to find the total price due in cell D2. To make things a little more challenging there is a $20 discount and 7% tax that needs to be applied to the formula.
Steps to build the basic formula:
I was expecting an answer of $107.00 not $218.60. So, what went wrong? Let’s take a closer look at the formula and examine the order in which Excel did its calculation.
=A2-B2*C2+A2-B2
When calculating simple Excel formulas (or even complex formulas), Excel follows the order of operations which determines the order that calculations are performed in a formula.
Below is a table showing the order of precedence. It goes: parenthesis, exponents, multiple and division, then finally addition and subtraction.
You will notice that multiplication comes before subtraction. The problem in our example is that we need to subtract the discount first before multiplying the sales tax.
Since we need the subtraction calculated first we will need to wrap that part of the formula in parenthesis. Any part of a formula wrapped in parenthesis is calculated first.
The formula should look like this:
=(A2-B2)*C2+(A2-B2)
Here's a breakdown of how the order of operations will be applied to this updated simple Excel formula.
This will give us the correct answer of $107.00 due.