Practice by topic / Excel / Conditional Logic

IF Cell Is Blank Exercises

In an Excel formula, "" means an empty cell: =IF(A2="","Missing","OK") flags blanks, and =IF(A2<>"",…) does the opposite. ISBLANK, COUNTBLANK and COUNTA cover the rest. Checking for blanks first stops empty inputs turning into zeros in totals and pay calculations. These 10 exercises build up step by step, starting with flag a missing email, show a label only when a cell is filled, check for blanks with isblank.

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

1

Flag a Missing Email

Free

A2 should hold an email address but may be empty. Write a formula in B2 that returns 'Missing' if A2 is blank, otherwise 'OK'.

AB
1Email
2?
Show the solution

Use =IF(A2="","Missing","OK")

Right — two quote marks with nothing between them ("") means an empty cell.

Expected result in B2: Missing

Try it in the live spreadsheet →
2

Show a Label Only When a Cell Is Filled

Free

A2 holds the date a form came back, or is empty if it hasn't. Write a formula in B2 that returns 'Received' if A2 is not blank, otherwise an empty result ("").

AB
1Form returned
212 Mar?
Show the solution

Use =IF(A2<>"","Received","")

Good — <>"" means 'is not blank', and returning "" keeps the cell visually empty.

Expected result in B2: Received

Try it in the live spreadsheet →
3

Check for Blanks With ISBLANK

Free

A2 holds the date a contract was signed, or is empty. Write a formula in B2 that uses ISBLANK to return 'Chase' if A2 is empty, otherwise 'Done'.

AB
1Signed date
2?
Show the solution

Use =IF(ISBLANK(A2),"Chase","Done")

Right — ISBLANK returns TRUE for an empty cell, so it can be the condition in an IF.

Expected result in B2: Chase

Try it in the live spreadsheet →
4

Only Calculate When Both Inputs Exist

A2 holds hours worked and B2 an hourly rate (currently blank). Write a formula in C2 that returns 'Incomplete' if either A2 or B2 is blank, otherwise A2*B2.

ABC
1HoursRatePay
238?

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 →
5

Same Check With Both Inputs Filled

A2 holds hours worked and B2 an hourly rate. Write a formula in C2 that returns 'Incomplete' if either cell is blank, otherwise A2*B2.

ABC
1HoursRatePay
23812.5?

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 →
6

Count Empty Required Fields

A2:D2 is one row from a form. Write a formula in E2 that counts how many of the four fields are blank.

ABCDE
1NameEmailPhoneAddress
2Tan Wei9123 4567?

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 →
8

Fall Back to a Default When Blank

A2 holds a custom price (blank if none was agreed) and B2 the list price. Write a formula in C2 that returns the custom price if there is one, otherwise the list price.

ABC
1Custom priceList price
249?

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

Treat a Blank Score as Absent

A2 holds an exam score, or is blank if the student was absent. Write a formula in B2 that returns 'Absent' if A2 is blank, 'Pass' if the score is 50 or more, otherwise 'Fail'.

AB
1Score
247?

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 →