Sum Function
SUM
Adds all the numbers in a range of cells.
Syntax
SUM(number1,number2, ...)
Number1, number2, ... are 1 to 30 arguments for which you want the total value or sum.
Remarks
- Numbers, logical values, and text representations of numbers that you type directly into the list of arguments are counted. See the first and second examples following.
- If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells, logical values, text, or error values in the array or reference are ignored. See the third example following.
- Arguments that are error values or text that cannot be translated into numbers cause errors.
You can download an example spreadsheet to see how this works. Click here to download the excel spreadsheet. Click on the worksheet example.
Example
You need to add the numbers 5, 10, 20, and 30 together.
You will use the SUM function to add them together. To do that you type in the equal sign ( = ) before the formula to tell Excel that it is a function and not text. Then you type in SUM(5,10,20). When your done typing it will look like picture 1. Then you click on the checkmark to accept the formula. The result will be 35.
Picture 1
The above example is fine if you don't ever have to modify any of the numbers but what if you do need to change a number like lets say we need to change the 5 to a 10. We can just modify the formula, but that increases the chances of error. There is a better way to do the above example.
Give each number its own cell and then have the formula reference the cell and not the number. That way you never touch the formula again. You just touch the cell that has the data you need to change. In this example, we assign cells A1, B1, and C1 as data cells. We assign D1 to be the formula cell that will give us the answer of what A1 + B1 + C1 equals to.
In this example we will enter the number 5 in cell A1, enter enter 10 in Cell B1 and enter number 20 in cell C1. Then we type the formula in D1. The formula will read =SUM(A1:C1) See Picture 2. When we click on the checkmark, the answer will give us 35 See picture 3. Now if we need to change the 5 to a 10, we just modify cell A1 and the formula never gets touched. Now cell A4 will show 40
|
You can download an example spreadsheet to see how this works. Click here to download the excel spreadsheet. Click on the worksheet example.