Make decisions with IF
Turn a clear rule into a formula that works on either side of a boundary.
By the end, you’ll be able to:
- Read the three parts of IF
- Write numeric and text comparisons
- Test below, at and above a threshold
A condition chooses between two results
A delivery is free when the order value is at least 100. This rule has a condition, a result when it is true and a result when it is false.
With order value in B2, =IF(B2>=100,"Free","Paid") returns Free for 100 or more, and Paid below 100. The first equals sign begins the formula; the comparison inside the parentheses asks the question.
Understand each argument
=IF(logical_test, value_if_true, [value_if_false])logical_test is the condition. value_if_true is the result when it is true. value_if_false is the alternative. Although Excel makes the last argument optional, write both outcomes explicitly while learning.
Enclose text results in straight double quotes: "Free". Numeric results such as 0 do not need quotes. Quoting a number produces text, which can behave differently in later calculations.
| Operator | Meaning |
|---|---|
= | Equal to |
<> | Not equal to |
> / < | Greater / less than |
>= / <= | Includes equality |
Worked example: a delivery charge
The charge is 0 when order value is at least 100, otherwise 5. Use =IF(B2>=100,0,5). An order of 80 returns 5, an order of 100 returns 0 and an order of 140 returns 0.
“At least” includes 100, so use >=. Using > would charge an order worth exactly 100. A valid formula can still implement the wrong policy.
Compare two cells too: with budget in B2 and actual spending in C2, =IF(C2>B2,"Over","Within") treats spending exactly equal to budget as Within.
Keep text values consistent
=IF(B2="Paid","Release","Hold") returns Release when status is Paid. Excel’s ordinary text comparison is case-insensitive, so paid also matches. Extra spaces are different: a trailing space can prevent a match.
A blank, misspelling or unfamiliar status uses the false result if it does not meet the condition. Keep source values consistent instead of adding more nested formulas to compensate for unclear data.
Check below, exactly at and above a numeric threshold. For text, test the expected status and an alternative. These exercises repeat the checks with changed inputs.
Later lessons combine conditions with AND and OR. Start with one clear rule before building nested decisions.
Give it a try.
Work through each exercise, check your answer and use a hint whenever you need one. Formula tasks check changed inputs, including boundary cases.
0 of 4 exercises complete
The bounded practice checker accepts equivalent supported formulas, lowercase function names and text labels, extra spaces, and comma or semicolon separators. Array tasks check the complete result shape and values. It is a teaching tool, not a complete Excel engine. See supported behavior.
Take this with you
Write the condition and both outcomes clearly. Choose comparison operators carefully and test the boundary.
Practice in Excel
Download the course workbook, follow the tasks, save your completed .xlsx and check its supported formula tasks here. Native Excel features use a separate review checklist.
Download practice workbook Check my workbook ↗Technical references and lesson review
Original lesson content. Technical behavior checked against Microsoft documentation. Reviewed 2026-10-16.