StatementNest

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")
Check all three cases
ActualBudgetResult
120100Over
80100Within
100100Within

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

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.

Try the guided exerciseSee the full curriculum

Product reference: Microsoft documentation. Teaching examples and fictional data by StatementNest.