Intermediate
60 mins
Teacher/Student led
+80 XP
Pupils work on their own device

Logical Formulas: IF

You will discover how the IF formula lets a spreadsheet make decisions. By checking if costs exceed a threshold you set, your project budget will automatically flag items that are over budget using a simple three-part pattern.

Teacher Class Feed

Load previous activity

    1 - Introduction ~5 mins

    Today you will

    • learn how an IF formula makes a decision
    • practise one IF on Aoife's phone-case costs
    • add a Flag column to {{code:05_project_budget}} that shows Over budget

    Illustration for IntroductionIf you don't have {{code:05_project_budget}} yet, tell your teacher now.

    Warm-up

    Think of one cost in your Something Real project that would worry you if it went too high. Would your limit be €20, €50 or €100? You will use that number later.

    2 - Key Concepts ~7 mins

    An IF formula checks something and then shows one of two answers.

    The condition is the test it checks, such as {{code:C2>40}}.

    The threshold is the number that sets off the flag.

    The value if true and the value if false are the two answers. Any words go inside double quotes.

    Example: Aoife's phone cases

    Aoife wants any cost over €40 flagged. Her formula is {{code:=IF(C2>40,"Over budget","")}}. If the cost is more than 40, the cell says Over budget. If not, it stays blank.

    3 - Step-by-step Task ~14 mins

    You will type Aoife's five costs on a practice sheet and flag the ones over €40. Watch your teacher first, then follow the steps in the box below.

    If you don't have {{code:05_project_budget}}, make a new spreadsheet with that name in {{code:05_budget}} first.

    This is the data you will type:

    ItemCategoryCost (€)Flag
    Blank cases (50)Materials85
    Vinyl stickersMaterials18
    Heat-press hireEquipment60
    Instagram adsMarketing25
    Packaging bagsMaterials12

    4 - Common Issues ~4 mins

    If something goes wrong

    • If you see {{code:#NAME?}} or {{code:#VALUE!}}, check that IF is spelled right and Over budget is inside straight double quotes.
    • If every flag is wrong, check that the letter points at your Cost column and the costs have no € sign.
    • If your Cost column isn't C, change the letter to match, like {{code:=IF(E3>50,"Over budget","")}}.

    5 - Your Turn on the Real Budget ~20 mins

    Independent Practice

    Your goal: Add a Flag column to {{code:05_project_budget}} that marks costs above your own threshold.
    Time: ~20 minutes
    Task:
    1. Open the main budget sheet in {{code:05_project_budget}}, not {{code:IF_practice}}.
    2. Write down your Cost column letter, your first item row and your threshold.
    3. Type Flag as the heading in the next empty column beside your costs.
    4. In the first item row, type your IF using this pattern. Ask your teacher to check it.
    5. Fill it down every item row, then change one cost to test the flag.
    {{code:=IF(YourCostCell>YourNumber,"Over budget","")}}
    Success criteria:
    • My Flag column has a clear heading.
    • My IF uses my own column letter and threshold.
    • The flag changes when I change a cost.
    • Only rows over my limit show a label.
    123learn · Online learning platform

    Unlock the full learning experience

    You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.

    Hundreds of curriculum-aligned lessons
    Interactive activities in every lesson
    Printable resources & progress tracking
    Copyright Notice
    This lesson is copyright of Coding Ireland 2017 - 2025. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more