Skip to main content

Excel Formulas - Combining the Mathematical Operators


- 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
  • 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:

Formula with Brackets
With Brackets
 
Formula without 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.
Example 2Substitute the asterisk symbol from example 1 with the forward slash. So the formula will be changed from this:
= (A1 + A2) * A3

to this:
= (A1 + A2) / A3
Press the Return key on your keyboard to reveal the answer. It should be 37.5. Now take the brackets out and try again. Again, you get a different answer. The total will now be 50!
Again the same process is at work. Excel sees division as more important than adding up, so it does that first. So it will divide 50 by 2 to get 25. Then it will add the contents of cell A1 to get 50. With the brackets, we force Excel to do the adding up first, then divide by the cell A3.
Example 3
This time, enter the following formula for cell A5:
= (A1 * A2) / A3
Press the Return key on your keyboard to reveal the answer. It should be 625.
Remove the brackets and try again. The answer should be 625 again. This is because Excel sees Multiplication and division as being of equal importance. When all things are equal, Excel calculates from left to right.
Likewise, Excel sees addition and subtraction as being of equal importance. So it will calculate from left to right if you use addition and subtraction in the same formula. As an example, study this formula below:
Example 3
As you can see, the formula in cell A5 is = A1 + A2 - A3. Now does that mean this:
= (A1 + A2) - A3
Or this:
= A1 + (A2 - A3)
Work it out on paper to see if there is any difference.

Despite the answer above, operator precedence is important: All sums are not equal!

Comments

Popular posts from this blog

Beginners PHP  -This is a complete and free PHP programming course for beginners. It's assumed that you already have some HTML skills. But you don't need to be a guru, by any means. If you need a refresher on HTML, then click the link for the Web Design course on the left of this page. Everything you need to get started with this PHP course is set out in section one below. Good luck! Home Page > PHP Section One - An Introduction to PHP 1. What is PHP and Why do I need it? 2. What you need to get started 3. Installing and testing Wampserver 4. Troubleshooting > PHP Two - Getting Started With Variables 1. What is a Variable? 2. Putting text into variables 3. Variables - some practice 4. More variable practice 5. Joining direct text and variable data 6. Adding up in PHP 7. Subtraction 8. Multiplication 9. Division 10. Floating point numbers > PHP Three - Conditional Logic 1. If Statements 2. Using If Statements 3....
Javascript Tutorials for the Beginner - Welcome to the Home and Learn course for Javascript. Although it is aimed at complete beginners to the subject we do assume that you have some knowledge of HTML and a little CSS. You don't have to be an expert, though. Just the basics will do. (If you're not sure about the HTML then see our Web Design course.) You don't need to buy any software for this Javascript course - you probably already have everything you need to get started.   > Section One: Getting Started 1. Software needed 2. Our Javascript Templates 3. A little word about debugging Home Page > Section Two: The Browser 1. A First Script 2. Javascript Tag Placement 3. The Browser Object Model 4. Browser Window Methods 5. The Document Object Model > Section Three: Javascript Programming Basics 1. Javascript Variables 2. Math Operators 3. Operator Precedence 4. IF Statements 5. IF ... Else 6. Comparison Operators 7...

PRATYUSHA HOME

Hi interesting readers, Prathysha NGO, Chennai. Bala gurukul orphange, chennai. Pratyusha support, Hyderbad. Krr oldage home, Vizag. Disa foundation.......................................................... so on..................... Join hands with us for a good cause. Thank you all. Contact  us on our  whatsapp no:  8939374254    for the more details. You can pay through Paytm scanner. for each donor we will give an online PDF book as a gift. Thank you Pratyusha Home