AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Formulas and functions

Week 16 · Unit 7: Be a data engineer · 3 lessons
2

Cell references keep up

Computing 5: Unit 7, pp. 86–103
GoalUse cell references in a formula so that the answer updates when a value changes.
New words
cell reference · the name of a cell, made from its column letter and its row number, such as B2column · a line of cells that goes down the sheet; it has a letterrow · a line of cells that goes across the sheet; it has a numberrecalculate · to work out the answers again, which a spreadsheet does automatically
Explanation

Every cell has a name made from its column letter and its row number, such as B2. This name is the cell reference. In a formula we can use a cell reference instead of a number. The spreadsheet then uses the value that is in that cell. For example, =B1*B2 multiplies the values in B1 and B2. When we change a value in B1, the spreadsheet recalculates the formula at once. This is a great advantage of a spreadsheet. We use constants only for numbers that never change, such as the 7 days in a week.

B3fx=B1*B2
AB
1Rows8
2Seats in a row12
3Seats in the hall96
Worked examples
B3fx=B1*B2
AB
1Rows10
2Seats in a row12
3Seats in the hall120
The hall gets two more rows. We change only the value in B1. The formula =B1*B2 recalculates, and B3 now shows 10 × 12 = 120.
FormulaB1 changes from 8 to 10Result
=8*12the formula stays the samestill 96, which is wrong
=B1*B2the formula uses the new value120, which is right
Compare a formula with constants and a formula with cell references.
B2fx=B1/7
AB
1Weekly bus pass42
2Cost for one day6
We can mix a cell reference and a constant. The weekly pass costs 42 and a week has 7 days, so one day costs 42 ÷ 7 = 6. If the pass price changes, the answer changes.
Class activity

Paper spreadsheet (pairs). Draw a grid with columns A to C and rows 1 to 3 on paper. Write numbers in B1 and B2 and the formula =B1+B2 in B3 on a sticky note. One player is the ‘spreadsheet’ and works out B3. The other player changes the number in B1 or B2 and asks for the new answer. Do five changes. Then try again, but with the formula =5+7 written as constants. What do you notice?

Practice
1
What is the formula for B3, and what does it show?
AB
1Boxes4
2Pens in a box6
3Total pens?
2
The number of boxes changes from 4 to 7. What does B3 show now, if its formula is =B1*B2?
3
Why is =B1*B2 better than =4*6 in this sheet?
4
Write the formula for B3, give its value, and say what B3 shows if B1 becomes 25.
AB
1Jar A30
2Jar B18
3Difference?