The IF function
Show one result when a test is TRUE and another when it is FALSE. Beginner · 4 min · IF, Text results, Empty text ""
IF turns a TRUE/FALSE test into a decision:
=IF(test, value_if_true, value_if_false)
- test: a comparison such as
B2>=C2 - value_if_true: the result when the test is TRUE
- value_if_false: the result when it is FALSE
Results can be text in double quotes, numbers, or whole calculations. You'll use all three to settle this month's sales bonuses.
Steps
Did each rep hit their target? In
D2:D8, showHitwhen sales are greater than or equal to the target, andMissedotherwise.Reps who hit their target earn a bonus: their sales multiplied by the rate in
B10. Everyone else gets 0. Fill inE2:E8, locking the rate as$B$10so it survives copying.Managers only want a note where action is needed. In
F2:F8, showBook a chatwhen the status in column D isMissed. Otherwise show nothing, using empty quotes"".Ben just closed a late sale. Change his sales in
B3to10200and watchD3,E3andF3update together.
Remember
=IF(test, value_if_true, value_if_false)picks one of two results.- Results can be text (in quotes), numbers or calculations.
""shows an empty-looking cell instead of FALSE.
Previous: Comparisons: TRUE or FALSE · Next: Nested IF and IFS