An IF formula turns a spreadsheet from a calculator into a decision-making tool. Instead of scanning every row of your project budget looking for problems, IF reads each row, asks a yes/no question, and writes the answer next to the number. Today you'll use it to add a Flag column to your own Something Real budget, so the costs that need attention jump out the moment you open the file.
You already use IF thinking every day. You check your phone battery and plug it in if it's under 20%. You check your Leap Card balance and top up if it's under €5. That same "if X, then Y, otherwise Z" pattern is exactly what an IF formula does. Think of one more example from your own life where a number triggers a decision — what's the number, and what changes when the answer is YES vs NO?
An IF formula has three ingredients. Once you can name them, you can read any IF formula out loud and write your own.
| Concept | Why it matters | Example |
|---|---|---|
IF function — a formula written as =IF(condition, value_if_true, value_if_false) that returns one of two answers depending on a test | It lets the spreadsheet flag rows automatically instead of you eyeballing every one | In a club fundraiser budget, =IF(B2>100,"NEEDS APPROVAL","OK") tags every expense over €100 |
Condition — a comparison that is either TRUE or FALSE, e.g. B2>100 or A3="Done" | This is the test IF runs; if you get the condition wrong, the whole formula gets the wrong answer | B2>100 is TRUE when venue hire is €180, FALSE when printing is €45 |
Comparison operators — > greater than, < less than, >= at least, <= at most, = equals, <> not equal | Different thresholds need different operators — "over 100" is > but "at least 100" is >= | For a low-stock alert in a Centra stocktake, use <. For a spend-over-limit alert, use > |
| Threshold — the number or value you compare against in the condition | It's the line between "flag this" and "leave it alone" — choose it so the flags actually tell you something useful | — |
A short Matching worksheet in this lesson lets you check you can name each part of the formula before you write one yourself.
You're going to build the exact IF formula you'll use on your own budget later, on a small practice spreadsheet first. The scenario: a volunteer is running expenses for a local community fundraiser and wants any cost over €100 flagged automatically as "NEEDS APPROVAL" so the committee can review it. You'll enter four sample costs, write the IF formula once, and autofill it down.
When your IF formula misbehaves, it's almost always one of these four things. Check them before you ask for help.
| Issue | Solution |
|---|---|
The cell shows #NAME? | Missing or curly quotes around the text results. Retype the formula using straight quotes (") from your keyboard — copy-paste from a document or webpage can sneak in curly quotes (“/”) that the spreadsheet doesn't recognise as text markers. |
The cell shows the formula itself as text (e.g. IF(B2>100,"NEEDS APPROVAL","OK")) | You forgot the leading = sign. Click the cell, press {{key:F2}} (or double-click) to edit, add = at the start, and press {{key:Enter}}. |
| Every row says "OK" even though some costs are clearly over the threshold — or every row says "NEEDS APPROVAL" | You've put the TRUE and FALSE results in the wrong order, or used the wrong operator. Read the formula out loud: "if cost is greater than 100, show X, otherwise show Y." If X and Y are swapped, swap them in the formula. |
| Autofill copied the formula but every cell shows the same result as C2 | You probably typed an absolute reference ($B$2) instead of a normal one (B2). IF needs to test each row, so the B reference must move — remove the dollar signs and autofill again. |