← Working with data

Add up a column

A function is a ready-made formula with a name. SUM adds up the numbers in a range of cells, and a range such as B2:B8 means every cell from B2 down to B8. The colon says 'all the cells from here to there'; a comma only lists the cells you name. SUM works its answer out again when any cell in the range changes.

A weather station records the rainfall every day. At the end of the week someone has to add up all seven numbers. A sheet can do it, but only if you tell it which cells.

Here is a week of rainfall from a school weather station, in millimetres. The total is in B9. It uses SUM, a function that adds up a range of cells.

A B
1 Day Rainfall (mm)
2 Monday 0
3 Tuesday 12
… … …
8 Sunday 3
9 Total =SUM(B2:B8)
How this lesson works: Predict, Try, Investigate, Modify, Practise, Make
Extra examplesYour teacher may tell you which.
PredictRead the problem and decide what you think before you try anything. A wrong guess is fine: it shows you what to look for.

What is the new total?

The total in B9 is 46. Thursday's rainfall in B5 was recorded as 0, but the gauge was found to have been blocked and the right amount is 6. You change B5 to 6. What does B9 show?

TryTry it on the board and compare the result with your prediction.

Try: change a reading

Was your guess right? You did not change the formula in B9. You changed one number in its range, and the total followed.

Try it yourselfYour edits are saved in this browser.
Need a hint?

Before a hint: what kind of stuck is this? Try a strategy first

Click B5, type 6 and press Enter.

Another hint

Click B9 and read the bar. It shows the SUM formula.

Change Thursday's rainfall in B5 to 6. What does the Total in B9 show?

Use the board. This ticks when you get there.

InvestigateWork out why it happens, one step at a time.

Worked example: write a SUM

Worked exampleBefore each step, say what you think comes next.
  1. =SUM(…)\texttt{=SUM(} \ldots \texttt{)}Start with =, then the name of the function and a bracket.

Now: what does the colon do?

What does B2:B8 mean in =SUM(B2:B8)?

Sam's total shows 3, but the week had much more rain. Click the line where Sam first goes wrong.

Sam's other formula is =SUM(B1:B8), and B1 holds the heading Rainfall (mm). What does it show?

ModifyChange the problem on purpose and see what happens.

Vary: change the range

B2 to B8 hold 0, 12, 4, 0, 7, 20 and 3. What does =SUM(B3:B6) show?

You want the total for Tuesday to Friday only, which are B3 to B6. Which formula do you write?

A second week's rainfall is in column C, in C2 to C8. You copy B9 =SUM(B2:B8) into C9. What does C9 hold?

PractiseA few on your own, to check you have it.

Total the weeks

Need a hint?

Before a hint: what kind of stuck is this? Try a strategy first

Click B9 and type =SUM(B2:B8), then press Enter.

Another hint

Both weeks are in the sheet: Week 1 is in column B and Week 2 in column C.

Need a hint?

Before a hint: what kind of stuck is this? Try a strategy first

A range can be a block: B2:C8 starts at B2 and ends at C8, and holds both weeks.

Another hint

Click B11 and type =SUM(B2:C8).

Try it yourselfYour edits are saved in this browser.

B9 holds =SUM(B2:B8) and shows 46. You change Sunday's rainfall in B8 from 3 to 10. What does B9 show now?

Write a formula in B9 that adds up Week 1's rainfall. Then write one in C9 for Week 2.

Use the board. This ticks when you get there.

Write one formula in B11 that adds up both weeks at once.

Use the board. This ticks when you get there.

MakeMake your own problem using what you have learned. Expect a few tries; that is normal.

Your own week

Change one of your days. Does the total follow?

Try it yourselfYour edits are saved in this browser.
Need a hint?

Before a hint: what kind of stuck is this? Try a strategy first

Type how many minutes you read each day (any numbers will do) in B2 to B8.

Another hint

In B9 write =SUM(B2:B8).

Type the minutes you read on each of the seven days. Write a formula in B9 that adds them up.

Use the board. This ticks when you get there.

Make Extra · typicalMake your own problem using what you have learned. Expect a few tries; that is normal.

In your own spreadsheet app

Excel, Google Sheets and Numbers all have SUM. You can type the range or drag across the cells with the mouse after the bracket. There is also an AutoSum button (a Greek capital sigma, Σ) that writes a SUM for the cells above or to the left of the selected cell. If your total looks too small, check the range has the first and last cells you meant.

Now you can
Next lesson5. Typical, smallest and biggestAVERAGE adds up the numbers in a range and divides by how many there are, to give a typical value. MIN and MAX give the smallest and the biggest, and together they show how spread out the numbers are. A cell left empty is skipped, but a 0 you type is a real number and pulls the average down. ROUND tidies how many decimal places show.
For teachers

Students learn that SUM adds up a range of cells, that a colon in a range means every cell from one end to the other, and that the total follows when any cell in the range changes. They total a week of weather-station rainfall, then two weeks, then a week of their own numbers, and repeat it in the spreadsheet app the school uses. About 45 minutes.

Open the teacher guide: answers, solutions, slides and a worksheet.

Students will be able to

Before class

Do the Try board yourself: change B5 and click B9 to read the formula.

The one idea: SUM is a named formula that works on a range, and a range is a block of cells named by its two ends. Students do not need to know other functions yet.

The sheet on the page ignores words in a range (as Excel and Sheets do), so a heading in the range does no harm. A word typed where a number is expected (a typed 'five') is not added, which is a good thing to notice with students.

Real tools: Excel and Sheets have an AutoSum button (Σ) that guesses the range. Encourage students to check the range it picks, and to treat it as a first guess.

Running the lesson

  1. Predict: students who chose 46 think SUM remembers the old total. Ask when the sheet does the adding.
  2. Try: ask which cell they changed and which cell moved.
  3. Worked example: say the range aloud (from B2 down to B8) and ask what a comma would mean.
  4. Practise: ask what block B2:C8 holds, and why one SUM can cover two columns.
  5. Own app: walk round. Common slips: forgetting the =, or a range that stops a row short.

The hard part (on purpose)

Telling a comma from a colon. =SUM(B2,B8) looks reasonable and shows a number, so nothing says it is wrong. Ask students to add up the cells by hand and compare.

When students get stuck

Stretch and support

Stretch: Make a cell that shows what share of the week's rain fell on Saturday. Which formula do you need, and which parts of it would have to stay put if you copied it down?

Support: A card: =SUM(first cell:last cell). The colon means every cell from the first to the last.

Where it leads

Next in Working with data: Typical, smallest and biggest (AVERAGE, MIN and MAX).

Science and geography: rainfall, water use, mass and distance are all totalled this way. Use your own class data if you have it.

What each step is for