IF function practice exercises (free, checked instantly)
No download, no sign-up3 exercises · checked instantly
IF is the first function that makes a spreadsheet decide something, and it shows up in nearly every report and job test. These three exercises go from a number result to text results: a bonus when a rep hits target, a shipping fee that drops to zero over a threshold, and a Yes/No column. Each one is filled down a whole column and checked row by row, so a formula that only works for the first row doesn't pass.
Quick refresher
IF(logical_test, value_if_true, value_if_false) returns the second argument when the test is TRUE and the third when it's FALSE. The test is a comparison such as G2>=F2. Text results go in double quotes, "Yes"; numbers and cell references don't. The IF with AND and OR guide adds more conditions, and the IF function reference lists every argument.
- 1
Reps who reach their target earn a $500 bonus. In H2, use IF: 500 when the Q3 total (G2) is at least the Target (F2), otherwise 0.
- Use IF
Select H2 and type = to start its formula (in the cell or the formula bar)A B C D E F G H 1 Rep Region Jul Aug Sep Target Q3 total Bonus 2 Amara Osei North $12,400 $13,100 $11,800 $36,000 $37,300 3 Ben Fischer South $9,800 $10,250 $12,100 $30,000 $32,150 4 Lina Chen East $15,200 $14,800 $16,900 $45,000 $46,900 5 Diego Alvarez West $8,700 $9,100 $8,400 $28,000 $26,200 6 Eva Novak North $11,200 $12,600 $13,900 $36,000 $37,700 7 Farid Haddad South $13,300 $12,900 $14,100 $39,000 $40,300 8 Grace Kim East $10,100 $9,600 $10,800 $33,000 $30,500 9 Hugo Martin West $14,500 $15,800 $15,100 $42,000 $45,400 - 2
Shipping is free for orders of at least the amount in L1, otherwise it costs the fee in L2. Compare each order's Total (column I) and show its shipping in J2.
- Use IF
- No typed numbers
Select J2 and type = to start its formula (in the cell or the formula bar)A B C D E F G H I J K L 1 Order Date Customer Product Category Qty Price Status Total Shipping Free from $50.00 2 1001 2 Mar 2026 Mara Okafor Monstera Plants 1 $34.00 Shipped $34.00 Fee $4.95 3 1002 2 Mar 2026 Jonas Lind Terracotta pot Pots 3 $12.50 Shipped $37.50 4 1003 3 Mar 2026 Priya Raman Snake plant Plants 2 $22.00 Shipped $44.00 5 1004 4 Mar 2026 Tomás Ruiz Watering can Tools 1 $18.00 Pending $18.00 6 1005 5 Mar 2026 Elif Demir Fern Plants 4 $9.50 Shipped $38.00 7 1006 5 Mar 2026 Mara Okafor Potting mix Soil 2 $7.25 Returned $14.50 8 1007 6 Mar 2026 Kenji Mori Pruning shears Tools 1 $24.00 Shipped $24.00 9 1008 7 Mar 2026 Ines Varga Ceramic pot Pots 2 $19.00 Pending $38.00 10 1009 8 Mar 2026 Jonas Lind Monstera Plants 1 $34.00 Shipped $34.00 11 1010 9 Mar 2026 Sofia Rossi Fern Plants 6 $9.50 Shipped $57.00 12 1011 10 Mar 2026 Priya Raman Potting mix Soil 5 $7.25 Shipped $36.25 13 1012 11 Mar 2026 Leo Brandt Snake plant Plants 1 $22.00 Pending $22.00 - 3
Did each rep hit their target? In H2, show "Yes" if the Q3 total (G2) is at least the Target (F2), otherwise "No".
- Use IF
Select H2 and type = to start its formula (in the cell or the formula bar)A B C D E F G H 1 Rep Region Jul Aug Sep Target Q3 total Hit target? 2 Amara Osei North $12,400 $13,100 $11,800 $36,000 $37,300 3 Ben Fischer South $9,800 $10,250 $12,100 $30,000 $32,150 4 Lina Chen East $15,200 $14,800 $16,900 $45,000 $46,900 5 Diego Alvarez West $8,700 $9,100 $8,400 $28,000 $26,200 6 Eva Novak North $11,200 $12,600 $13,900 $36,000 $37,700 7 Farid Haddad South $13,300 $12,900 $14,100 $39,000 $40,300 8 Grace Kim East $10,100 $9,600 $10,800 $33,000 $30,500 9 Hugo Martin West $14,500 $15,800 $15,100 $42,000 $45,400
What these exercises check
Each exercise fills a whole column and checks every row, so a formula that only works for the first row doesn't pass. Text results are compared exactly, so quotes and spelling matter. IF is behind most flags and labels in real spreadsheets: budget alerts, pass and fail, bonus eligibility, and anything that says “only when”.
Common mistakes
- Swapping the two results: the value for TRUE always comes first.
- Using
>when the rule says “at least”, which needs>=. - Leaving out the third argument, so a false test shows FALSE instead of 0 or a blank.
Tips
- Read the test aloud: “if the Q3 total is at least the target”. If it sounds wrong, it is.
- Forgetting quotes around text results gives #NAME?.
- Put thresholds like a bonus amount in a cell and lock it with
$, so changing the rule is one edit.
Updated . Answers are checked on our server against the course's answer key and against changed data; nothing you type is stored.
Practise IF on a live sheet
Lesson 10, TRUE, FALSE and IF (Unit 3, Decisions), has 5 more graded exercises, checked instantly, with steps and hints when you're stuck. Pro