Course / Logic & Decisions

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)

Results can be text in double quotes, numbers, or whole calculations. You'll use all three to settle this month's sales bonuses.

Steps

  1. Did each rep hit their target? In D2:D8, show Hit when sales are greater than or equal to the target, and Missed otherwise.

  2. Reps who hit their target earn a bonus: their sales multiplied by the rate in B10. Everyone else gets 0. Fill in E2:E8, locking the rate as $B$10 so it survives copying.

  3. Managers only want a note where action is needed. In F2:F8, show Book a chat when the status in column D is Missed. Otherwise show nothing, using empty quotes "".

  4. Ben just closed a late sale. Change his sales in B3 to 10200 and watch D3, E3 and F3 update together.

Remember

Previous: Comparisons: TRUE or FALSE · Next: Nested IF and IFS