Adding Numbers in Columns

Let's write a formula for adding together a series of numbers.

In the spreadsheet for types of weapons used in murders that we downloaded from the FBI website, the spreadsheet already included the total number of homicides in which any kind of firearm was used each year from 2004 to 2008. Those numbers are in row 6.

But what if these totals hadn't been included in the original data and you needed to calculate them yourself using the spreadsheet (or if you wanted to use the spreadsheet to double-check the FBI's calculations).

This would require totaling up for each year the column of numbers for the five weapon types in the spreadsheet:

  • Handguns - row 7
  • Rifles - row 8
  • Shotguns - row 9
  • Other guns - row 10
  • Firearms, type not stated - row 11

highlighting rows 7 - 11

To do this we need to insert a formula for adding a series of numbers in a column.

Let's start by doing this for the year 2004. Click on cell:


Which is in the column that shows the numbers for weapons used in 2004.

In that cell, type:


(note: the letters are not case sensitive. So for example so you could type in either B7 or b7)

This tells the spreadsheet to add up the number of murders committed with handguns (B7), rifles (B8), shotguns (B9), other guns (B10), and firearms, type not stated (B11) for the year 2004.

adding numbers in column B

You should type cell letters/numbers into a formula rather than the actual numbers.

That way if the numbers ever change (for example, if the FBI released updated murder weapon statistics for 2008), you won’t have to re-enter the new numbers in the formula. Instead you'd just type the updated numbers into the appropriate cells and the spreadsheet will apply the existing formula to the new numbers in those cells.

To see the result of this calculation press the enter/return key.

The formula will disappear, replaced in cell B23 by the number 9,385, which is the number homicides committed using some type of firearm in 2004 (which also is the same number included in the original FBI data in cell B6).