Know and understand the order in which mathematical operations are performed including the use brackets to make sure that formulae work

Topic 20 – Spreadsheets: Order of Operations (BODMAS/PEMDAS) and Formula Essentials

Learning objective

Students will be able to:

  • Explain the order in which a spreadsheet evaluates mathematical operators.
  • Use brackets (parentheses) and functions to force the required sequence of evaluation.
  • Apply relative, absolute and named references correctly within formulas.
  • Format numbers, apply conditional formatting, protect worksheets and set up printing – all skills required for Cambridge IGCSE ICT (0417) Paper 3.

Why the order of operations matters

  • The spreadsheet evaluates a formula automatically. If the intended sequence is not made explicit, the program follows its default precedence rules, which may give a different result from what the user expects.
  • Brackets (parentheses) let the user control the exact order of evaluation.
  • Exam questions often ask you to apply or evaluate a formula – you must be able to state the sequence and show the intermediate steps.

Standard precedence rules (BODMAS / PEMDAS)

LevelOperator(s)Typical example
1Parentheses ( )(2 + 3) × 4
2Exponentiation ^2 ^ 3
3Multiplication * and Division /6 × 2 ÷ 3
4Addition + and Subtraction ‑5 + 4 ‑ 2

In Cambridge‑approved spreadsheet programs the exponent operator is the caret (^). Some software also accepts **, but for the exam you should use ^.

How a spreadsheet applies the rules

  1. Evaluate the innermost parentheses.
  2. Evaluate exponentiation (^).
  3. Perform all multiplication and division from left to right.
  4. Perform all addition and subtraction from left to right.
  5. After the arithmetic is resolved, evaluate any functions whose arguments have become simple values.

Functions and precedence

Functions such as SUM, AVERAGE, IF, COUNT, MAX, MIN are evaluated after any arithmetic inside their argument list has been resolved.

Example – mixed arithmetic and a function

=SUM(A1*B1, C1^2) + D1

  1. Inside SUM:

    • Calculate A1*B1 (multiplication).
    • Calculate C1^2 (exponentiation).

  2. Apply SUM to the two results.
  3. Add the value in D1 (addition).

Cell‑referencing conventions

  • Relative reference – e.g. A1. Changes when the formula is copied to another cell.
  • Absolute reference – e.g. \$A\$1. Remains fixed when copied.
  • Mixed reference – e.g. \$A1 (column fixed, row relative) or A\$1 (row fixed, column relative).

Example – copying a formula

=A1*\$B\$1 + $C2

If the formula in cell D3 is copied down one row to D4 it becomes:

=A2*\$B\$1 + $C3

Only the relative parts (A1A2 and C2C3) change.

Named cells and ranges

Named ranges make formulas easier to read and reduce errors.

  1. Select the cell or range (e.g. A1:A10).
  2. Enter a name in the Name Box (e.g. Sales) and press Enter.

Using the name in a formula works exactly like a reference:

=SUM(Sales) / COUNT(Sales)

This returns the average of the values in the range A1:A10.

Number formatting

Formatting does not affect the underlying value, only how it is displayed.

  • Currency – select the cells ► Home ► Number ► Currency (e.g. £1,234.00).
  • Percentage – select ► Home ► Number ► Percentage (e.g. 45%). The spreadsheet automatically divides the underlying number by 100.
  • Date – select ► Home ► Number ► Short Date (e.g. 04/01/2026). Internally dates are stored as serial numbers.

Conditional formatting

Highlights cells that meet a rule – useful for exam questions that ask you to “show values above a threshold”.

  1. Select the target range.
  2. Click Home ► Conditional Formatting ► Highlight Cells Rules ► Greater Than…
  3. Enter the threshold (e.g. 1000) and choose a format (e.g. Light Red Fill).
  4. Click OK. Any cell > 1000 now appears highlighted.

Protection and printing (Paper 3 skills)

Protecting cells / sheets

  1. By default all cells are locked. Select the cells you *want* users to edit, right‑click ► Format Cells ► Protection ► Uncheck “Locked”.
  2. Then protect the worksheet: Review ► Protect Sheet. Set a password if required and choose which actions (e.g. “Select unlocked cells”) are allowed.

Printing set‑up

  1. File ► Print (or Ctrl+P).
  2. In the Print dialog choose:

    • Orientation – Landscape for wide tables.
    • Scaling – Fit Sheet on One Page or Fit All Columns on One Page.
    • Headers/Footers – click Page Setup ► Header/Footer to add sheet name, date, page number.

  3. Preview, then click Print.

Using brackets (parentheses) to control evaluation

  • Brackets can be nested to any depth; the innermost pair is evaluated first.
  • Always use brackets when the required order differs from the default BODMAS sequence – this avoids “accidental” errors.

Example 1 – without brackets

=A1 + B1 * C1

With A1=2, B1=3, C1=4 the result is:

\$2 + 3 \times 4 = 2 + 12 = 14\$

Example 2 – brackets change the order

=(A1 + B1) * C1

Result:

\$ (2 + 3) \times 4 = 5 \times 4 = 20 \$

Example 3 – nested brackets with a function

=SUM((A1 + B1) ^ 2, D1) / (C1 - \$E\$1)

Assuming A1=2, B1=3, C1=4, D1=6, E1=1:

  1. Innermost parentheses: A1 + B1 = 5.
  2. Exponentiation: 5 ^ 2 = 25.
  3. Function SUM(25, 6) = 31.
  4. Denominator: C1 - \$E\$1 = 4‑1 = 3.
  5. Division: 31 / 3 ≈ 10.33.

Statistical functions (required by the syllabus)

  • COUNT(range) – returns the number of numeric entries.
  • MAX(range) – returns the largest value.
  • MIN(range) – returns the smallest value.

Example

=MAX(Sales) - MIN(Sales)

Gives the range (difference between highest and lowest sales figures).

Common pitfalls and error handling

  • Unmatched parentheses – formula returns #VALUE! or #REF!.
  • Relying on default precedence when a different order is required – always use brackets for clarity.
  • Division by zero – produces #DIV/0!. Guard with IF, e.g. =IF(B1=0, "n/a", A1/B1).
  • Mixing text and numbers – use VALUE() or ensure the cell format is numeric.

Practical skills required for Paper 3 (ICT 0417)

Students must be able to demonstrate the following actions in a spreadsheet program:

  • Insert, delete and hide rows/columns.
  • Enter, edit and copy formulas, using relative, absolute and named references.
  • Apply number formats (currency, percentage, date) and conditional formatting.
  • Use at least one statistical function (COUNT, MAX, MIN) and one logical function (IF) in a formula.
  • Protect cells or sheets, and use the “undo/redo” commands.
  • Set up page layout (orientation, scaling, headers/footers) and print a worksheet.

Practice questions

  1. Given A1 = 5, B1 = 2, C1 = 3, evaluate =A1 - B1 ^ C1.
  2. Rewrite the formula in question 1 so that the subtraction is performed before the exponentiation.
  3. Enter a formula that adds A1 and B1, multiplies the sum by C1, then subtracts D1. Show the formula and list the evaluation steps.
  4. Using the data from question 1, write a formula that returns "Error" if C1 is zero, otherwise returns A1 / C1. (Hint: use IF.)
  5. Explain why the following formula produces #DIV/0! and modify it so that the error is avoided: =SUM(A1,B1)/ (C1-D1) where C1 = 4 and D1 = 4.
  6. In the range A1:A5 the values are 12, 7, 9, 15, 4. Write a formula that returns the average of the highest three values.

Answers to practice questions

  1. Exponentiation first: 2 ^ 3 = 8. Then subtraction: 5 - 8 = -3.
  2. Force subtraction first with brackets: =(A1 - B1) ^ C1. Result: (5‑2) ^ 3 = 3 ^ 3 = 27.
  3. Formula: =(A1 + B1) * C1 - D1.

    Evaluation steps:

    1. Parentheses: A1 + B1.
    2. Multiplication: result of (a) × C1.
    3. Subtraction: result of (b) – D1.

  4. Formula: =IF(C1=0, "Error", A1/C1). Returns “Error” when C1 is zero; otherwise performs the division.
  5. The denominator (C1‑D1) equals zero, giving #DIV/0!.

    Revised formula with error‑checking: =IF(C1=D1, "Undefined", SUM(A1,B1)/(C1-D1)).

  6. Highest three values are 15, 12 and 9.

    Formula: =AVERAGE(LARGE(A1:A5,{1,2,3})) (or = (LARGE(A1:A5,1)+LARGE(A1:A5,2)+LARGE(A1:A5,3))/3).

Suggested revision diagram

A simple flow‑chart (can be sketched on a revision card) showing the evaluation sequence:

Parentheses → Exponentiation → Multiplication / Division → Addition / Subtraction → Function evaluation

Arrows point from one step to the next, reinforcing the order for quick recall.