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

Spreadsheets at work

Week 18 · Unit 7: Be a data engineer · 3 lessons
1

Pick the right formula

Computing 5: Unit 7, pp. 86–103
GoalRead a spreadsheet problem and choose an operator formula or a function that solves it, and spot common mistakes.
New words
operator formula · a formula that uses cell references and + - * /function · a built-in formula, such as SUM or AVERAGErange · a line of cells, written with a colon, such as C2:C4check · to look again to see that a result is sensible
Explanation

To choose a formula, read the problem and ask what it needs. To take one value from another, use the - operator with two cell references. To add many values, use SUM. To find the mean, use AVERAGE. Then check three things. Does the formula start with =? Does the range cover every row? Is the answer sensible? A quick check is to work out the answer by hand for one row. If the hand answer and the spreadsheet answer differ, there is a mistake in the formula.

What the problem needsWhat to use
take one value from anotherthe - operator with two cell references
add many valuesthe SUM function
find the meanthe AVERAGE function
Worked examples
D2fx=B2-C2
ABCD
1RunnerGoal (km)Done (km)Left (km)
2Nadia30246
3Liam301515
4Sam20182
A running club wants the kilometres left for every runner. Left = goal − done. In D2 the formula is =B2-C2, and it shows 30 − 24 = 6.
C6fx=AVERAGE(C2:C4)
ABCD
1RunnerGoal (km)Done (km)Left (km)
2Nadia30246
3Liam301515
4Sam20182
5Total57
6Mean19
The club also wants the total and the mean of the kilometres done. The total in C5 is =SUM(C2:C4), which shows 24 + 15 + 18 = 57. The mean in C6 is =AVERAGE(C2:C4), which shows 57 ÷ 3 = 19.
FormulaWhat is wrongFixed formula
=B2+C2 for ‘left’it adds, but ‘left’ needs a subtraction=B2-C2
SUM(C2:C4)no equals sign=SUM(C2:C4)
=SUM(C2:C3)the range leaves out Sam’s row=SUM(C2:C4)
=C2:C4no function says what to do=SUM(C2:C4)
=AVERAGE(C2:C4)/3divides by 3 twice=AVERAGE(C2:C4)
These formulas have mistakes. Can you see what is wrong with each?
Class activity

Formula doctor (pairs). Each partner writes six formulas on cards for a small table, for example the table of a running club. Some are right and some have mistakes: a missing equals sign, a range that is too short, the wrong operator. Swap cards. The doctor decides which cards are healthy and writes a fix for each sick card. Then the doctor checks one row by hand. Whose cards were hardest to cure?

Practice
1
A bus route has legs of 2, 3, 5, 4 and 6 km. Write the formulas for the total and the mean in B7 and B8.
AB
1LegKm
2School to Park2
3Park to Library3
4Library to Market5
5Market to Station4
6Station to Depot6
7Total?
8Mean?
2
Which of these formulas work? (a) =SUM(B2:B6), (b) =B2:B6, (c) AVERAGE(B2:B6), (d) =AVERAGE(B2:B6)
3
How many pages are left to read? Write the formula for D2 and say what it shows.
ABCD
1BookPagesReadLeft
2Sea Tales18075?
4
The list of legs grows to 40 rows. Why is =SUM(B2:B41) better than =B2+B3+B4+…?