# spreadsheets

## Adding Numbers Using the SUM Formula

If you want to add a large group of numbers in a row or column, there's another way to do that quickly in a spreadsheet by using the **SUM** formula.

For example, in the spreadsheet on weapons used in homicides, what if you wanted to know the total number of homicides in which a firearm was not the weapon used.

To calculate that, you could add up the numbers in **rows 12 - 21** for each year using the SUM formula

(Note: row 22 - "Other weapons or weapons not stated" - may or may not involve a non-firearm-related homicide, so we're leaving that out of this calculation)

To use the **SUM** formula to calculate the number of non-firearm-related homicides in rows 12 - 21, first click on cell:

**B23**

In that cell type this formula

**=SUM(B12:B21)**

Then press the enter/return key.

You'll see there were **3,969** non-firearm-related homicides in 2004.

In our formula, **=SUM** is shorthand for telling a spreadsheet to add up a series of numbers.

After typing **=SUM**, you type an **opening parentheses**, followed by the **letter/number of the first cell** in the column you want to add.

After that type a **colon**, then the **letter/number of the last cell** in the column you want to add, followed by a **closing parentheses**.

The colon instructs the spreadsheet to apply the SUM calculation to the numbers in all the cells between the first and last cell you’ve entered.

### Adding Select Numbers with the SUM Formula

You also can add up select numbers in a column, rather than a span of them, using the SUM formula.

To do that, in the **SUM** formula you replace the colon with either **plus** **signs** ( **+** ) or **commas **( **,** ), to separate the specific cells you want to total up.

Thus if you wanted to total up only the number of homicides in 2004 in which either poison (cell **B15**) or narcotics (cell **B18**) was involved, you would type this formula:

**=SUM(B15+B18)**

or

**=SUM(B15,B18)**

Either of which will add the number in cell B15 to the number in cell B18 and give you the total number of homicides involving poison or narcotics in 2004 (**93**).