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
1

Calculate with a formula

Computing 5: Unit 7, pp. 86–103
GoalWrite a formula that starts with = and uses the symbols + - * and / to calculate an answer.
New words
formula · a calculation that we type into a cell; it starts with =operator · a symbol that tells the spreadsheet what to do: + - * /constant · a number that we type into a formula and that does not changeformula bar · the bar above the grid that shows what is in the chosen cell
Explanation

A spreadsheet can do calculations for us. We write each calculation as a formula. A formula always starts with an equals sign. It can use numbers, which are called constants, and operators. We type + to add, - to subtract, * to multiply and / to divide. When we press Enter, the cell shows the answer and the formula bar still shows the formula. For example, =12+8 shows 20. If the formula has no equals sign, the spreadsheet treats it as plain text.

B1fx=12+8
AB
1Tickets sold on two days20
Worked examples
CalculationFormulaCell shows
add=9+413
subtract=9-45
multiply=9*436
divide=36/49
The four operators have their own symbols. Notice that we use * for times and / for divided by.
FormulaWorkingCell shows
=2+3*43 × 4 = 12, then 2 + 1214
=(2+3)*42 + 3 = 5, then 5 × 420
A spreadsheet follows the order of operations. Multiplying and dividing are done before adding and subtracting. Brackets are done first.
B3fx=6*5
AB
1Packs6
2Stickers in a pack5
3Total stickers30
Packs of stickers: the formula =6*5 shows 30. But the numbers are typed into the formula. If the number of packs changes, the cell still shows 30, so the answer is wrong.
Class activity

Formula or not? (pairs). Write twelve cards, such as =8*3, 8*3, =8x3, =40/5, 40 / 5 and =(2+6)*3. Sort them into ‘works as a formula’ and ‘does not work’. Check each card for the equals sign and the right symbol. Then write the answer of each working card. Which cards give the same answer in different ways?

Practice
1
Write a formula for each: (a) 15 take away 6, (b) 7 times 8, (c) 48 divided by 6, (d) 14 plus 9.
2
What does cell B2 show?
B2fx=20/4
AB
1Pencils20
2Pencils each for 4 children?
3
Which of these will not work as a formula, and why? (a) =8*3, (b) 8*3, (c) =8x3.
4
Work out the value of each cell.
CellFormulaShows
B1=(6+4)*3?
B2=6+4*3?