Excel Activity 08: Conditional Formula
Conditional Formula 01
1. Open the file contained within the folder name “01 Sales Commission”.
2. Calculate the commission for all the sales reps in Column C:
We need to use an =IF function to calculate the commission
Printer Cartridge Reps Commission for This Month Using Single IF
Sales Rep Sales Commission This Month
Emily ₱ 25,000.00
Rob ₱ 19,000.00 Threshold ₱ 30,000.00
Michael ₱ 27,500.00 High Rate 20.00%
Francine ₱ 14,000.00 Low Rate 1.00%
Mircea ₱ 33,300.00
Helena ₱ 41,800.00
Bridget ₱ 17,300.00
Paolo ₱ 23,800.00
TOTAL ₱ 201,700.00 ₱ -
3. In cell C4 create an =IF function to calculate the commission. Use the following to help you:
• set up range names for the input cells in column F
• If the sales in column B >= 30000, commission rate is 20%
• If the sales are anything less, commission rate is 1%
The formula will look like this:
=IF(B4>=threshold,highrate*B4,lowrate*B4)
4. Copy the commission rate formulae down column C to calculate commissions for all of the other
reps.
5. Change your commission rate input cells in column F to check that your =IF function is working
correctly:
When you change the input cells in in F column commissions will change
Printer Cartridge Reps Commission for This Month Using Single IF
Sales Rep Sales Commission This Month
Emily ₱ 25,000.00 ₱0.00
Rob ₱ 19,000.00 ₱0.00 Threshold ₱ 40,000.00
Michael ₱ 27,500.00 ₱0.00 High Rate 50.00%
Francine ₱ 14,000.00 ₱0.00 Low Rate 0.00%
Mircea ₱ 33,300.00 ₱0.00
Helena ₱ 41,800.00 ₱20,900.00
Bridget ₱ 17,300.00 ₱0.00
Paolo ₱ 23,800.00 ₱0.00
TOTAL ₱ 201,700.00 ₱20,900.00
6. Rename the worksheet to Conditional Formula 01
Conditional Formula 02
1. Open the file contained within the folder name “02 Babygro Orders”
Babygro Orders
Age of Baby
Order No Order Size
(in weeks)
5937 2
5938 8
5562 3
5939 12
5880 9
5941 6
5945 1
5942 5
Age threshold: 6
2. Use an =IF function to display a sizing text message.
3. In cell C4, create an =IF function to display a message for the order size. Use the following to
help you:
• create a range name for the age threshold and use it in your =IF function.
• If the age is greater than or equal to 6 weeks, set the order size to Medium
• Anything less, set the order size to Small
Your formula should look like this
=IF(B4>=age,"medium","small")
4. Change the age threshold as shown below:
Babygro Orders
Age of Baby
Order No Order Size
(in weeks)
5937 2 small
5938 8 small
5562 3 small
5939 12 medium
5880 9 small
5941 6 small
5945 1 small
5942 5 small
Age threshold: 10
5.
When you change the age threshold, the messages should change.
6. Rename the worksheet to Conditional Formula 02
CONDITIONAL FORMULA 03
1. Open the file contained within the folder name ” 03 COUNTIF and SUMIF Basics.”
Jan Week 1 Sales Figs for Midlands Team
Name No. Sales
Juliette 54
Rory 27
Sam 39
Juliette 88
Juliette 39
Sam 96
COUNT 0 6 (see the difference when you remove data from both cols)
COUNTA 6 6 (see the difference when you remove data from both cols)
IF name is Sam IF sales>60 IF sales<40
COUNTIF 2 2
If name >K and sales >30 If name is Sam and sales >50 If name is Juliette and sales >50
COUNTIFS 2 1
Manchester
Mansfield
Liverpool
Hull
Derby
Oxford
Alton
4 IF the name < Manchester
2. Scroll down to row 15 where there are some example =COUNTIF functions.
3. In cell E15 create an =COUNTIF function to count how many have sales less than 40:
Check your answer matches the one here.
IF name is Sam IF sales>60 IF sales<40
COUNTIF 2 2 3
4. In cell E18 create an =COUNTIFS function to show the number of sales where the name
is Juliette and sales are greater than 50:
If name >K and sales >30 If name is Sam and sales >50 If name is Juliette and sales >50
COUNTIFS 2 1 2
check your answer with the one here.
5. Click on the SUM tab to see the =SUMIF examples:
Jan Week 1 Sales Figs for Midlands Team
Name No. Sales
Juliette 54
Rory 27
Sam 39
Juliette 88
Juliette 39
Sam 96
SUM 0 343
IF name is Juliette IF sales>80 IF sales<40
SUMIF 0 184
If name <M and sales <45 If name is Rory and sales <50 If name is Sam and sales >70
SUMIFS 39 27
6. In cell E14 create an =SUMIF function to show the total of all sales where the sales are
less than 40:
check that you get the same as the answer here.
IF name is Juliette IF sales>80 IF sales<40
SUMIF 0 184 105
7. In cell E17 create an =SUMIFS function to show the total of all Sam's sales that are greater than
70:
If name <M and sales <45 If name is Rory and sales <50 If name is Sam and sales >70
SUMIFS 39 27 96
8. Copy or Move the COUNT and SUM worksheet to the workbook where you put the Conditional
Formula 2 & 3 (Don’t rename the sheet)
Conditional Formula 04
1. Open the file contained within the folder name “04 Pesko Parking Charges”
Pesko Store Car Parking Charges
Hours Parking
Car Reg Parked Charge
DA12 NEJ 0.5
MA16 BVW 4.0
DD11 SFD 1.5
MA14 NHG 2.0
YK14 BHH 5.5
DY15 FLB 3.0
MM12 SWL 0.5
If park <= 2 hrs, no fee (message)
Anything more pay £2 per hour
Threshold 2
Parking fee ₱ 2.00
2. Use an =IF function to calculate the parking charge.
3. In cell C4, create an =IF function to calculate the parking charge. Use the following to help you:
• Create range names for the parking fee and the the threshold, and to use these in
your =IF formula.
• If the hours parked are less than or equal to 2 hours, display a message saying Free
parking
• If the hours are greater, the parking fee is Hours Parked * Parking Charge
4. Copy the =IF function down the rest of the column to calculate the other parking fees
5. Change the threshold and the parking fee as shown below to check everything works:
When you change the input cells the parking fees should change.
Pesko Store Car Parking Charges
Hours Parking
Car Reg Parked Charge
DA12 NEJ 0.5 free parking
MA16 BVW 4.0 ₱ 12.00
DD11 SFD 1.5 free parking
MA14 NHG 2.0 ₱ 6.00
YK14 BHH 5.5 ₱ 16.50
DY15 FLB 3.0 ₱ 9.00
MM12 SWL 0.5 free parking
If park <= 2 hrs, no fee (message)
Anything more pay £2 per hour
Threshold 1.5
Parking fee ₱ 3.00
6. Rename the worksheet to Conditional Formula 04
Should be within the same workbook with the Conditional Formula 1 to 3
Conditional Formula 05
1. Open the file contained within the folder name “05 Car Parking Single IF”
Car Parking Charges
No. Hrs Parking
Car Reg
Parked Charge
DA12 NEJ 6 If park >6 hours, pay P3.50 pr hr
MA16 BVW 12 Anything less pay P1 pr hr
DD11 SFD 8
MA14 NHG 11 Threshold 6
YK14 BHH 5 Long Hour Fee ₱ 3.50
DY15 FLB 3 Short Hour Fee ₱ 1.00
MM12 SWL 12
MA16 GKW 7
FS12 DSD 1
DA11 SBM 6
2. The =IF function charges either P3.50 or P1 for parking.
3. Change the threshold and parking fees to different values to check that your =IF function is
working correctly
4. Rename the worksheet to Conditional Formula 05
Conditional Formula 06
1. Open the file contained within the folder name “06 Pesko Clubcard Vouchers”
Pesko Club Card Vouchers
Date Amount Club card Vouchers Earned
15-Jan ₱ 112.66
21-Jan ₱ 17.54
4-Mar ₱ 96.87
11-May ₱ 32.78
29-May ₱ 56.38
20-Jun ₱ 62.94
2-Aug ₱ 74.89
18-Aug ₱ 13.45
7-Sep ₱ 73.63
3-Oct ₱ 93.86
29-Oct ₱ 52.11
8-Dec ₱ 143.67
Voucher Threshold ₱ 95.00
High Vouchers 0.25 P4 = 1 voucher whole vouchers only
Low Vouchers 0.1 P10 = 1 voucher whole vouchers only
We want to calculate the number of club card vouchers earned.
2. In cell C4 create an =IF function to calculate the number of club card vouchers earned. Use the
following information to help you:
• Set up range names for the input cells containing the high and low voucher amounts
and the voucher threshold figures.
• If the amount is greater than P95, you get 1 voucher per P4 spent
• Anything less you only get 1 voucher for every £10 spent
3. Copy your =IF function down the column to calculate the other club card vouchers earned.
4. Change the rates for the high and low vouchers and the threshold as shown below:
Pesko Club Card Vouchers
Date Amount Club card Vouchers Earned
15-Jan ₱ 112.66 22
21-Jan ₱ 17.54 0
4-Mar ₱ 96.87 19
11-May ₱ 32.78 0
29-May ₱ 56.38 0
20-Jun ₱ 62.94 0
2-Aug ₱ 74.89 14
18-Aug ₱ 13.45 0
7-Sep ₱ 73.63 14
3-Oct ₱ 93.86 18
29-Oct ₱ 52.11 0
8-Dec ₱ 143.67 28
Voucher Threshold ₱ 70.00
High Vouchers 0.2 P4 = 1 voucher whole vouchers only
Low Vouchers 0 P10 = 1 voucher whole vouchers only
When you change the input cell values, the answers in column C should change.
5. Rename the worksheet to Conditional Formula 06
Conditional Formula 07
1. Open the file contained within the folder name “ 07 Single IF Beetle Length”.
2. Create a formula that uses =IF to display a test message about the length of each beetle in our
field study of the school playing fields:
Beetle Length Study of School Playing Fields
Sample Length Result Extra Comment In column C if beetle is > average = "Long"
BE64 5.2 Anything less = "Short"
BE98 6.1
BE42 2.9 Extra Challenge - Extra Comment
BE67 3.5
BE66 3.6 In comment cell if beetle is long
BE12 3.8 Plus calculate how much longer than average
BE91 6.9
BE39 8.1
BE54 5.3
BE19 5.2
BE11 4.7
BE44 4.6
BE03 7.4
BE17 8.7
BE72 6.2
BE73 7.8
BE53 8.2
Average 5.8
The message in column C should be SHORT or LONG.
3. In cell C4, create a formula using =IF function to calculate the following:
• If the beetle length > average in cell B21, set the text message to LONG
• If length is shorter, set the text message to SHORT
4. Copy the formula down to the rest of column C to calculate all the other messages.
5. Change the length of the sample in cell B4 to 50.2 (this would be an alien monster beetle!). This
will pull the average up and change many messages to SHORT
6. If you like a challenge, have a go at creating a formula using =IF in cell D4 to display a message
that calculates how much longer than average the beetle is:
• If the beetle length is LONG your message should say This sample is x.xx longer
than average
• The cell should be blank if the beetle length is not LONG.
7. Change the length of the sample in cell B4 to 20.7 to check that your =IF formula works:
8. Rename the worksheet to Formula 07