The IF function in a spreadsheet
Checks a test, like B2>=50. Shows the second value if the test is true and the third if it is false. Text results go in quotes, e.g. =IF(B2>=50,"Pass","Fail").
Understanding The IF function in a spreadsheet in VCE Spreadsheets, SQL & Visualisation
What it does: Going and Away are text results, so they are in quotes. The text being compared with, "Yes", is in quotes too. When =IF(B2>=50,"Pass","Fail") is copied down one row, the cell reference updates to B3. Each row is then tested using its own mark. 4 is not greater than 10, so the test is false. IF shows the third part, "Small". This formula has no value for when the test is false. To give a result for both cases, include a test, a true value and a false value.
Common mistakes: Text results must be in quotes. Pass should be "Pass", otherwise the spreadsheet thinks it is a name and shows an error. When the formula is copied down, the row number changes. This row should check B3, not B2, so it matches its own row.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 4–20) and word search (Modules 4–34).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
=IF(test, value_if_true, value_if_false)Fill in the Blanks
Spot the Error
Student with a class code? Join your class →