EXAMPLE + HANDS-ON PRACTICE
IF practice: turn a comparison into an answer
IF chooses one result when a condition is true and another when it is false. In an expense review, it can turn a comparison into a readable label such as “Over” or “Within”.
The pattern
=IF(test,value_if_true,value_if_false)If B2 is the actual amount and C2 is the budget, this formula labels a transaction:
=IF(B2>C2,"Over","Within")| Actual | Budget | Result |
|---|---|---|
| 120 | 100 | Over |
| 80 | 100 | Within |
| 100 | 100 | Within |
Why equality matters
The comparison > means strictly greater than. It is false when the amounts are equal. Changing it to >= changes the rule: an amount exactly on budget would then be labeled Over. Testing only an obvious over-budget row can hide that mistake.
Common errors
- Put text answers in double quotes.
- Keep the true and false answers in the intended order.
- Reference worksheet cells rather than typing the current result.
- Check below, equal and above values before trusting a rule.
Practice the rule
The guided exercise asks you to compare Amount with Budget in a fictional ledger. It checks the calculation and gives feedback. The alternate data sets include cases below, equal to and above budget, so the same method gets repeated rather than memorizing a single answer.
Apply it to a monthly summary
An IF condition can contain calculations. In the monthly project, compare SUM of all actual amounts with SUM of all budgets, then return a monthly status. This combines a familiar total with a logical test. The figures are teaching data, not financial recommendations.
Examples use English function names and comma separators. Your Excel language settings may use different names or separators.
Product reference: Microsoft documentation. Teaching examples and fictional data by StatementNest.