Has the Sales Target Been Met?
Your task: In B5, write a formula that shows Bonus when sales reach the target, and No bonus when they do not.
Full instructions, scenario and goal
Scenario
A salesperson earns a quarterly bonus when their sales meet or exceed their target. The sheet shows this quarter's sales and the target. Your manager wants the sheet to say "Bonus" or "No bonus" automatically, so it stays right when the numbers change.
Your task
- Look at the sales figure in B3 and the target in B4.
- Select cell B5, next to the label "Bonus status".
- Type a formula that returns the text Bonus when sales meet or exceed the target, and the text No bonus when they do not. Press Enter.
- Select Check Answer to see whether your formula is correct.
You are done when
- B5 contains a formula that refers to the sales and target cells.
- It shows Bonus when sales are at or above the target, and No bonus when they are below.
- It would still work if the sales and target numbers were changed.
What you will practise
Make a formula choose between two results depending on whether a condition is true, using a comparison and cell references.
The idea in 30 seconds
IF makes a decision. It checks a condition and returns one result when the condition is true and another when it is false. The condition is usually a comparison between two cells, such as one value greater than, less than or equal to another, and the results can be numbers, text in quotation marks, or even another formula.
Spreadsheet
Loading spreadsheet…
Keyboard shortcuts
- Arrow keys
- Move between cells
- Shift + Arrow keys, or drag with the mouse
- Select a range
- Ctrl + Arrow keys
- Jump to the edge of a block of data
- Type, or F2, or double-click
- Edit a cell (F2 switches arrow keys between moving and editing)
- Click or arrow keys inside a formula
- Insert a cell reference after =, +, (, comma and similar
- F4
- Cycle a reference through A1, $A$1, A$1, $A1
- Enter / Tab while editing
- Confirm and move down / right (Shift reverses)
- Esc
- Cancel the edit
- Ctrl + C / X / V
- Copy, cut and paste (formulas adjust like in Excel)
- Delete
- Clear the selected cells
- Ctrl + Z / Ctrl + Y
- Undo and redo
- Ctrl + Enter
- Check your answer
- Tab when not editing
- Leave the spreadsheet
Type your answer in cell B5. Click a cell and type. Enter confirms, Esc cancels, Ctrl+Enter checks your answer.Tap a highlighted cell to type in it, then tap the green tick to confirm. Scroll the sheet sideways if it is wider than your screen.
New here? How an exercise works
- Read the task. Highlighted cells are yours to fill in; the rest are locked.
- Select (or tap) a highlighted cell and type a formula. It starts with =, like =A1+B1.
- Press Check answer. Stuck? Reveal hints one at a time.
The full explanation: the idea behind this exercise
IF makes a decision. It checks a condition and returns one result when the condition is true and another when it is false. The condition is usually a comparison between two cells, such as one value greater than, less than or equal to another, and the results can be numbers, text in quotation marks, or even another formula.
The comparison operators are =, <>, <, >, <= and >=. A classic trap is the boundary: ">" excludes the value itself and ">=" includes it, so always ask what should happen when the two values are exactly equal. Pointing the comparison at cells, not typed numbers, keeps the decision correct when the figures change.
Skills you will practise
- IF
- Comparison operators
- Text results
Common mistakes to avoid
- Using > instead of >=
- > means strictly greater, so a salesperson exactly on target would wrongly get No bonus. "Meet or exceed" needs >=.
- Typing the numbers into the formula
- =IF(52400>=50000,...) works today but ignores B3 and B4, so it is wrong as soon as either changes.
- Forgetting the quotation marks or the false result
- Text results need quotation marks. If the false result is missing, IF returns FALSE when the condition fails.