Cellgrids Cellgrids
Home › Practice questions › IF › Question 12

Excel IF Practice Question: Sales are in B2:B6 and targets in C2:C6. Pay 5% of sales as commission when…

By Rinkesh Shah, founder of Cellgrids.

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

ABCDE
1SalespersonSalesTargetCommission
2Amit5200050000?
3Neha3850040000?
4Rahul6100060000?
5Priya2980030000?
6Karan4520045000?

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

=IF(logical_test, value_if_true, value_if_false)

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

All practice questions · Excel exercises · Interview prep · Cheat sheet