GoalReview spreadsheet formulas, copying, validation and filters, and trace a micro:bit if … then … else program.
New words
formula · a calculation in a cell that starts with =cell reference · the column letter and row number of a cell, such as C3validation · a rule that limits what can be typed in a cellif … then … else · a statement that carries out exactly one of two paths
Explanation
A formula starts with = and uses cell references, so the answer updates when a value changes. The operators are +, -, * and /. SUM adds a range of cells and AVERAGE finds the mean. When we drag the fill handle, the formula is copied and its row numbers change. Validation limits what can be typed, such as the type, the length or the range. It cannot tell us that the data is true. A filter hides the rows that do not match a criterion. In a micro:bit program, an if … then … else block carries out exactly one of its two paths, depending on a true or false test such as lives = 0.
Idea
What to check
Example
formula
starts with = and uses cell references
=B2*C2
fill handle
row numbers change in each copy
=B3*C3 in the next row
validation
limits what may be typed
a whole number from 1 to 60
filter
hides rows that do not match
Price greater than 3
if … then … else
exactly one path is carried out
lives = 0
Worked examples
D3fx=B3*C3
A
B
C
D
1
Day
Tickets
Price
Income
2
Fri
25
4
100
3
Sat
40
4
160
4
Sun
25
4
100
A film club earns money each day. The formula in D3 is =B3*C3, which is 40 × 4 = 160. Dragging the fill handle from D2 gives the other rows.
B5fx=AVERAGE(B2:B4)
A
B
C
D
1
Day
Tickets
Price
Income
2
Fri
25
4
100
3
Sat
40
4
160
4
Sun
25
4
100
5
Mean
30
6
Total
360
A total and a mean for the same sheet. =SUM(D2:D4) adds 100 + 160 + 100 = 360. =AVERAGE(B2:B4) is (25 + 40 + 25) ÷ 3 = 30.
A lives game. The board starts with 3 lives. Each shake takes 1 life away. When lives equals 0 it shows End. Until then it shows the number of lives. The three shakes show 2, 1 and End.
Class activity
Paper sheet and paper board (groups of four). Draw a grid with columns A to D and rows 1 to 5 on a big sheet. One child writes the formulas, one works out the answers, one checks with a calculator and one changes a value. Predict which cells change before the value is changed. Then act out the lives game: one child is the board and holds the lives card, and another claps for each shake. What happens if the board keeps going after End?
Practice
1
Write the formula for D2. What is the value in D2? If it is copied to D3, what is the formula and the value?
A
B
C
D
1
Animal
Number
Food each (g)
Food (g)
2
Rabbits
5
40
?
3
Hamsters
12
15
?
D2 is =B2*C2, which is 5 × 40 = 200. D3 is =B3*C3, which is 12 × 15 = 180.
2
The cells B2 to B5 hold 8, 12, 5 and 7. What do =SUM(B2:B5) and =AVERAGE(B2:B5) give?
SUM gives 8 + 12 + 5 + 7 = 32. AVERAGE gives 32 ÷ 4 = 8.
3
A fuel game starts with 4 fuel and the board is shaken 3 times. What does it show each time?
Shake 1: fuel is 2, so it shows 2. Shake 2: fuel is 0, so it shows Empty. Shake 3: fuel is -2, which is not 0, so it shows -2.
4
A column for ticket numbers accepts only whole numbers from 1 to 60. Which of these are rejected? 0, 45, 61, 12.5
0 is rejected, because it is less than 1. 61 is rejected, because it is more than 60. 12.5 is rejected, because it is not a whole number. 45 is accepted.