Practice by topic / Excel / Conditional Logic

Basic IF Exercises

IF-style formulas let a spreadsheet make decisions — pass or fail, on time or late, which rate applies — so you don't have to check each row by hand. These 10 exercises build up step by step, starting with pass or fail a test score, flag overdue invoices, label inventory as low or ok.

3 of 10 free · no sign-up needed · graded on the formula you write

1

Pass or Fail a Test Score

Free

A2 holds a test score. Write a formula in B2 that returns 'Pass' if A2 is 60 or higher, and 'Fail' otherwise.

AB
1
272?
Show the solution

Structure it as =IF(condition, value_if_true, value_if_false): =IF(A2>=60,"Pass","Fail")

Nice — =IF(A2>=60,"Pass","Fail") covers both outcomes with a single condition.

Expected result in B2: Pass

Try it in the live spreadsheet →
2

Flag Overdue Invoices

Free

A2 holds days since an invoice was issued. Write a formula in B2 that returns 'Overdue' if A2 is over 30, otherwise 'Current'.

AB
1
245?
Show the solution

Use =IF(A2>30,"Overdue","Current")

Right — comparing days against 30 and branching gives an immediate status label.

Expected result in B2: Overdue

Try it in the live spreadsheet →
3

Label Inventory as Low or OK

Free

A2 holds a stock count. Write a formula in B2 that returns 'Low Stock' if A2 is under 10, otherwise 'OK'.

AB
1
26?
Show the solution

Use =IF(A2<10,"Low Stock","OK")

Good — a simple threshold IF is exactly what inventory alerts need.

Expected result in B2: Low Stock

Try it in the live spreadsheet →
6

Mark Attendance as Present or Absent

A2 holds hours attended out of a possible 8. Write a formula in B2 that returns 'Present' if A2 is greater than 0, otherwise 'Absent'.

AB
1
20?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
9

Determine Membership Tier Eligibility

A2 holds a customer's number of purchases. Write a formula in B2 that returns 'Gold' if A2 is at least 20, otherwise 'Standard'.

AB
1
225?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
10

Check If a Deadline Was Met

A2 holds days early or late (negative means late). Write a formula in B2 that returns 'On Time' if A2 is 0 or more, otherwise 'Late'.

AB
1
2-2?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →