Excel IF Practice Question: Sales are in B2:B6 and targets in C2:C6. Pay 5% of sales as commission when…
The question
Sales are in B2:B6 and targets in C2:C6. Pay 5% of sales as commission when sales reach the target, otherwise 2%. Show the commission in E2:E6.
The data
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Salesperson | Sales | Target | Commission | |
| 2 | Amit | 52000 | 50000 | ? | |
| 3 | Neha | 38500 | 40000 | ? | |
| 4 | Rahul | 61000 | 60000 | ? | |
| 5 | Priya | 29800 | 30000 | ? | |
| 6 | Karan | 45200 | 45000 | ? |
The yellow cells are where your answer goes.
Show answer
Expected results:
- E2 = 2600
- E3 = 770
- E4 = 3050
- E5 = 596
- E6 = 2260
How it works
Explanation: IF chooses the rate: 5% when sales are at or above the target, 2% otherwise. A sale exactly equal to the target counts as meeting it.
Syntax: =IF(B2>=C2,B2*0.05,B2*0.02)
Amit: 52000 x 5% = 2600. Neha: 38500 x 2% = 770. Karan: 45200 is above 45000, so 2260.
Try it yourself in the live sheet
Type your formula in the highlighted cell and get instant feedback. Free, no Excel install needed.
Try this question in the live sheet →IF syntax
Returns one value if a condition is true, another if false. Flagging an employee as Pass or Fail based on a score cutoff. Full IF guide.
More IF practice questions
- Using IF, show Pass if the marks are 40 or more, otherwise Fail. Fill C2 to C4.
- Show Reorder when the stock is below 20 and OK otherwise. Fill C2 to C4.
- Using IF, give a 5% bonus on sales above 50000 and 0 otherwise. Fill C2 and C3.
- A candidate is Eligible only if the age is 18 or above and the score is 60 or above.…
- Using IF with OR, show Free if the order is 1000 or more or the customer is a member,…
- A blank Days cell means the order is not delivered yet. Show Done if Days has a value…
- Using nested IF, assign grades: 90 and above is A, 75 to 89 is B, 50 to 74 is C, below…
- Using nested IF with these simplified slabs, find the tax: nothing up to 250000; 5% of…
All practice questions · Excel exercises · Interview prep · Cheat sheet