When adding a few cells, the SUM function will save you time. With larger ranges of cells, it’s essential.
Want more?
When I click inside an AutoSum value, we see it is a formula with the SUM function.
A function is a predefined formula. It helps you save time. Let me show you.
This formula is = sign, SUM, open parenthesis, B2, colon, B5, end parenthesis.
The colon indicates a range of cells.
The formula adds the range of cells from B2 through B5. It is essentially B2+B3+B4+B5.
You can see that when adding a few cells the SUM function will save you time.
With larger ranges of cells, it is essential.
To create a formula with the SUM function, you type the = sign, SUM, open parenthesis, select the range of cells you want to add, and press Enter.
The syntax, or grammar, of the SUM function is SUM, open parenthesis, number1, number2, and so on, and a closing parenthesis.
The arguments of a function--in this case number1, 2, and so on--are always contained in opening and closing parenthesis. number1 is required.
Square brackets around subsequent arguments indicate they are optional.
The arguments are separated by commas.
The arguments don't have to literally be numbers, such as 8.
They can be numbers from a range of cells, formulas, or the results from other functions.
You can use up to a total of 255 arguments.
Let's try it out.
If I try to use AutoSum here, it only gets the adjacent cells, not the entire column.
We can enter the SUM function, so that it adds the entire column.
You do this by entering individual cells.
I type =, SUM, open parenthesis, press the Ctrl key, so I don't have to type the commas, select the first cell, the next cell, and so on, and finally press Enter.
The formula uses the SUM function to add the cells.
As we previously saw, you can add a range of cells that are adjacent.
To add ranges of cells that are not adjacent, type the = sign, SUM, open parenthesis, hold down the Ctrl key, select the first range of cells, select the second range of cells, and press Enter.
Let's take a closer look at the formula.
As always, it starts with an = sign, then the SUM function, open parenthesis, then the first range of cells D2:D3 (this is the number1 argument in the SUM function), then a comma, then the next range of cells D5:D6 (this is the number2 argument in the SUM function), and then the closing parenthesis.
You can SUM numbers from different worksheets in the same workbook.
I type the = sign, SUM, parenthesis, first cell, comma, select the second cell from a different worksheet, and press Enter.
As always, the formula starts with an = sign, then the SUM function, open parenthesis, C8 is the number1 argument in the function, then a comma.
In creating the formula, all you have to do is select the cell on a different worksheet, but I thought I'd go through what it looks like in a formula.
It starts with an apostrophe, the name of the worksheet, another apostrophe, an exclamation point, and then the cell reference on the other worksheet.
Pretty cool!
Up next, the SUMIF function.