← Working with data

A formula keeps up

A spreadsheet cell has a name, such as C2 (column C, row 2). A cell that starts with = is a formula: it works out its answer from other cells by their names, and it works it out again whenever one of them changes. A number you type in as the answer does not. So you type the formula once, and the sheet keeps the answer right.

A scientist measures a bean plant on day 1 and on day 4, then works out how much it grew. Then she finds she wrote down the day 1 height wrong. Does she have to redo every sum?

A spreadsheet is a grid of cells. Every cell has a name made from its column letter and its row number, so the cell in column C, row 2 is C2. Cells can hold words, numbers or formulas.

Here is part of a Year 7 science sheet. Bean A was 3 cm tall on day 1 and 11 cm tall on day 4 (every height here is in cm). Cell D2 holds a formula that finds the growth.

A B C D
1 Plant Day 1 Day 4 Growth
2 Bean A 3 11 =C2-B2
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 does D2 show?

D2 holds the formula =C2-B2, so it shows 8. The scientist finds she measured wrong on day 1 and changes B2 from 3 to 5. What does D2 show now?

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

Try: change a cell

Was your guess right? Click D2 again. The bar shows =C2-B2 even though the cell shows 6. A cell shows its result, and the bar shows what it holds.

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 the cell B2, type 5 and press Enter.

Another hint

Click D2 and look at the bar above the sheet. It shows what the cell holds.

Change the Day 1 height in B2 to 5. What does the Growth in D2 show now?

Use the board. This ticks when you get there.

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

Worked example: write a formula

Worked exampleBefore each step, say what you think comes next.
  1. =C2-B2\texttt{=C2-B2}Start with =, so the spreadsheet knows this is a formula.

Now: what does the = do?

What does the = at the start of =C2-B2 tell the spreadsheet?

Sam's growth stopped being right after the day 1 height changed. Click the line where Sam first goes wrong.

Which cell is in column D, row 3?

ModifyChange the problem on purpose and see what happens.

Vary: change the cells, change the formula

B2 holds 3, C2 holds 11 and D2 holds =C2-B2. You change C2 to 15. What does D2 show?

B2 holds 3 and C2 holds 4. A cell holds =B2*C2 (the * means times). What does it show?

You want the cell E2 to show the two heights added together, B2 and C2. Which do you type in E2?

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

Write the formulas

Need a hint?

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

D2 already has a formula. Look at it in the bar, and write the same kind for D3 and D4.

Another hint

For Bean B the formula is =C3-B3. Check the row number matches the plant.

Try it yourselfYour edits are saved in this browser.
Which of these cells will keep giving the right growth if the Day 1 height changes?

Write a formula in D3 for Bean B's growth, and one in D4 for Bean C's growth. Do not type the answers.

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 sheet

Change one of your Day 1 heights. Does the growth 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 a Day 1 height in B2 and a Day 4 height in C2, then do the same for Beans B and C. Any numbers will do.

Another hint

In D2 type =C2-B2, then write the same kind of formula in D3 and D4, using that row's cells.

Fill in your own Day 1 and Day 4 heights for the three beans, and write a growth formula in D2, D3 and D4.

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 other spreadsheet apps all use the same cell names and start formulas with =. If your formula shows as words instead of a number, check that you typed the = at the start.

Now you can
Next lesson2. Copy a formulaWhen you copy a formula to another cell, its cell names move with it. Copy =C2-B2 from D2 down one row and it becomes =C3-B3, because the formula really means 'the cell one to the left, take away the cell two to the left'. So you write one formula, then copy or fill it down the column, and every row works on its own cells.
For teachers

Students learn that a spreadsheet cell has a name, that a cell starting with = is a formula that works its answer out from other cells by name, and that it works it out again when those cells change. They write growth formulas for a Year 7 bean-plant sheet and repeat the idea 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 B2, then click D2 and read the bar above the sheet.

The one idea: a formula uses cells' names, not their numbers, so the answer follows the cells. A number typed in as the answer does not.

The sheet on the page is a small teaching model with only what every spreadsheet shares: names, numbers, text, formulas that start with =, and the operators + - * /. It is not Excel or Sheets, and nothing here depends on either.

The last step asks students to do the same in the app your school uses. It works the same in Excel (desktop or web), Google Sheets and Numbers. Where they differ: Enter moves down in all of them, and Google Sheets or Excel may offer a pop-up of function names as students type; they can ignore it for now.

Years 6–8: the data is a plant-growth table like one in Year 7 science. Use your own class data if you have it, and have students type their own measurements in the last step.

Running the lesson

  1. Predict: students who chose 8 think D2 only shows what it showed before. Ask what 'formula' might mean.
  2. Try: ask why D2 changed when B2 was the cell they typed in.
  3. Worked example: ask which part of =C2-B2 is the = and which part is the names. Say the formula aloud: take B2 from C2.
  4. Practise: students often write =C3-B3 for D4 by copying. Ask which row Bean C is in.
  5. Own app: walk round. The common slip is a missing =, which shows the formula as words.

The hard part (on purpose)

Typing the answer instead of the formula. A student who types 8 in D2 gets a correct-looking sheet, so nothing tells them it is wrong until a cell changes. Have them change B2 and watch.

When students get stuck

Stretch and support

Stretch: Write one formula in E2 that shows how many times taller Bean A is on day 4 than on day 1. Which operator do you need? What if B2 were empty?

Support: A card: A cell's name is its column letter then its row number. Start a formula with =. Use cell names, not the numbers in them.

Where it leads

Next in Working with data: functions that work on a whole column (SUM and AVERAGE).

Years 6–8: the same sheet can record real measurements from a science investigation. Digital Technologies › Data representation covers how data is stored; this course is about using it.

What each step is for