← Working with data

Copy a formula

When 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.

The scientist measured thirty bean plants. She wrote the growth formula for the first one. Does she have to type it thirty times?

In the last lesson you wrote a growth formula for one bean. Here are five beans, all measured the same way (every height is in cm). Only D2 has a formula so far.

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

D2 holds =C2-B2. You copy D2 and paste it into D3, one row down. What does D3 hold?

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

Try: copy and paste

Was your guess right? Click D3 and read the bar: =C3-B3. The pasted formula is not the same text as D2's. It is the same rule.

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 D2, then the Copy button. Click D3, then the Paste button.

Another hint

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

Copy D2 and paste it into D3. What does the Growth in D3 show?

Use the board. This ticks when you get there.

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

Worked example: one rule, every row

Worked exampleBefore each step, say what you think comes next.
  1. D2: =C2-B2\texttt{D2: =C2-B2}C2 is one cell to the left of D2, and B2 is two cells to the left.

Now: which cell does D5 use?

D2 holds =C2-B2. You paste it into D5. What does D5 hold?

Sam's growth column shows 8 for every bean, but Bean C only grew 6. Click the line where Sam first goes wrong.

The formula in D2 is =C2-B2. Which words describe what it does, whichever row it is in?

ModifyChange the problem on purpose and see what happens.

Vary: change the paste

E2 holds =B2*10. You copy E2 into E5. B5 holds 5. What does E5 show?

D2 holds =B2+C2. You copy D2 and paste it one column to the right, into E2. What does E2 hold?

D2 holds a growth formula. What is the quickest way to get growth formulas into D3 to D6 that are all right?

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

Fill the column

Need a hint?

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

Click D2, then choose Fill down. It copies the formula into the cells below.

Another hint

You can also copy D2 and paste it into each of D3 to D6 one at a time.

Try it yourselfYour edits are saved in this browser.
D2 to D6 each hold a growth formula made by filling down. You change Bean D's Day 1 height in B5. Which cells change?

Use the formula in D2 to fill D3 to D6 with growth formulas for the other four beans.

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. Which two answers 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 any Day 1 and Day 4 heights for the five beans. Then write =C2-B2 in D2 and fill down.

Another hint

For the last column, write =D2/3 in E2 (growth divided by the 3 days between measurements) and fill down.

Fill in your own heights for five beans. Write a growth formula in D2 and fill it down to D6. Then write a growth per day formula in E2 (growth ÷ 3) and fill it down to E6.

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 copy formulas this way. To fill down, select the cell and the cells below it, then press Ctrl+D (Cmd+D on a Mac) or drag the small square at the corner of the cell downwards. To copy and paste, use Ctrl+C and Ctrl+V. Click a pasted cell to check its formula used its own row.

Now you can
Next lesson3. A cell that stays putCopying a formula moves every cell name in it, which goes wrong when the formula needs one shared cell, such as g in a weight formula. A dollar sign fixes a name: $B$7 stays on B7 wherever the formula is copied. Putting a shared number in its own cell, then fixing it with $, means you change it once and every answer follows.
For teachers

Students learn that copying a formula moves its cell names with it, so one formula can be copied or filled down a whole column and each row works on its own cells. They fill a growth column for five Year 7 beans, add a growth per day column, 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: copy D2, paste it into D3 and click D3 to read its formula.

The one idea: a formula's cell names are places relative to the cell it is in ('one to the left'), so when it is copied they move with it. Spreadsheet people call this a relative reference; students only need the idea that a copy moves its names.

The sheet on the page has Copy, Paste and Fill down buttons, and Ctrl+C and Ctrl+V work on a selected cell. The real tools work the same way. In Excel and Sheets, Ctrl+D fills down a selection, and the small square at the corner of a selected cell can be dragged down (or double-clicked in Excel and Sheets to fill as far as the data goes).

The next lesson, A cell that stays put, shows what to do when a copy must not move one of the names.

Running the lesson

  1. Predict: students who chose =C2-B2 think a copy is exact. Ask what D3 would then show, and whose growth that is.
  2. Try: ask which row D3's formula uses, and whose bean that is.
  3. Worked example: say the rule aloud (the cell one to the left take away the cell two to the left) and ask where it points in row 5.
  4. Practise: ask who finds Fill down quickest and why it is less likely to slip than typing.
  5. Own app: walk round. The common slips are pasting into the wrong cell and dragging the fill handle too far.

The hard part (on purpose)

Believing a copy is the same text. Students expect =C2-B2 to appear in D3, and the Predict shows the other answer. Have them click D3 and read the bar before you explain.

When students get stuck

Stretch and support

Stretch: Write one formula in F2 that shows whether Bean A grew more than Bean B (is D2 minus D3 positive?). What happens to it if you paste it into F3?

Support: A card: A copied formula moves its cell names by as much as the copy moves. D2 to D3 is one row down, so every row number goes up by one.

Where it leads

Next in Working with data: A cell that stays put (keeping one cell fixed while a formula is copied).

Years 6–8: the beans can be any measurements from a science investigation. Digital Technologies › Data representation covers how numbers are stored; this course is about using them.

What each step is for