Example 1
- Start a new spreadsheet
- Enter the number 25 in cell A1
- Enter the number 50 in cell A2
- Enter the number 2 in cell A3
- In cell A5 enter the following formula
=(A1 + A2) * A3
- Press the Return key on your keyboard to get the answer
The answer you should have got was 150. Notice the brackets in the formula. The brackets group part of your sum together. Without them, Excel will normally calculate from left to right. But it does some calculation before others. Excel sees multiplication as more important than adding up. To see what happens without the brackets, do this:
- Click on cell A5
- Click inside the formula bar at the top
- Delete both the brackets from the formula
- Press the return key on your keyboard to see the answer
Now the answer is different! This time you should have gotten 125. Here are the picture versions of both formulas:
You might think the second one is wrong. But it's not. It's just the way Excel works things out. Because it sees multiplication as more important than adding up, it will multiply cell A2 by cell A3 first. That gets the answer of 100. Excel will then add this answer to cell A1, which gives the answer 125.
With the brackets in, you force Excel to work things out your way. You're saying "Do the sum in brackets first, then multiply". When you do the brackets first, you get a different answer. A1 + A2 = 75. Multiply 75 by cell A3 and you get the answer 150.
The moral is: take care when you are grouping operators together. And force Excel to work things out your way by using brackets to group your sums.
There are times when you will want to combine the arithmetic operators in your calculations. Here are a few examples of combining the operators: Example 1
=(A1 + A2) * A3
The answer you should have got was 150. Notice the brackets in the formula. The brackets group part of your sum together. Without them, Excel will normally calculate from left to right. But it does some calculation before others. Excel sees multiplication as more important than adding up. To see what happens without the brackets, do this:
Now the answer is different! This time you should have gotten 125. Here are the picture versions of both formulas: | ||||||
| ||||||
With Brackets | Without Brackets | |||||
You might think the second one is wrong. But it's not. It's just the way Excel works things out. Because it sees multiplication as more important than adding up, it will multiply cell A2 by cell A3 first. That gets the answer of 100. Excel will then add this answer to cell A1, which gives the answer 125.With the brackets in, you force Excel to work things out your way. You're saying "Do the sum in brackets first, then multiply". When you do the brackets first, you get a different answer. A1 + A2 = 75. Multiply 75 by cell A3 and you get the answer 150. The moral is: take care when you are grouping operators together. And force Excel to work things out your way by using brackets to group your sums. |
No comments:
Post a Comment