Subtracting numbers in a Row

Another formula you can use in a spreadsheet is subtraction.

In our sample spreadsheet of weapons used in homicides, you might want to calculate if the numbers for each type of weapon used increased or decreased between 2004, the first year of the data, and 2008, the most current year of data.

To do this, you need to type a formula in a cell in one of the columns to the right of the existing data that will subtract the earliest number in 2004 from the most recent number in 2008.

Let's start with the total number of murders by firearms (row G) to see how they have increased or decreased between 2004 and 2008.

Click on cell:


Which is in the row that shows the total number of murders each year in which a firearm was used.

In cell G6 type the following:


=F6-B6 in cell G6

We're using the minus sign symbol (-) for the subtraction formula and telling the spreadsheet to take the number in cell F6 and subtract from it the number in cell B6. Thus we're subtracting the number of firearm murders in 2004 (B6) from the number of firearm murders in the most current year, 2008 (F6).

Now press the enter/return key.

The formula will disappear and the number 99 will appear in cell G6.

calculation in cell G6

This tells us there were 99 more homicides by firearm in 2008 than in 2004.

Now we can apply this same formula to each of the different types of weapons used to see how the numbers for each one increased or decreased from 2004 to 2008. We do this by copying the formula we just wrote in cell G6 to the other cells in the G column.

So click on cell:


If you move your mouse cursor over the bottom right corner of the cell, your cursor changes from an arrow pointer to a thin crosshairs.

When this happens, click on that crosshairs, hold down your mouse button and drag directly down over the rest of the cells in the G column.

An outline will appear around the cells you've selected.

Continue dragging your mouse until you get to cell:


Then release your mouse button.

In your spreadsheet will appear numbers in each of the G column cells.

applying subtraction formula to multiple cells

These numbers represent the increase or decrease in each type of weapon used in a homicide between 2004 and 2008.

We can use the same process to apply this formula to the data in row 5 above, which is total number of murders using all types of weapons.

Click on cell G6 and move your mouse cursor to the bottom right corner so the crosshairs are displayed. Click on that, hold down, drag up to cell G5 and release.

You'll see the number -30 displayed in cell G5, which shows the total number of homicides using all types of weapons has decreased by 30 from 2004 to 2008.