Logical
Checking whether a cell is empty
Definition
Showing one result when a cell is empty means wrapping ISBLANK inside IF.
Syntax
=IF(ISBLANK(value), value_if_true, value_if_false)
Arguments
| Argument | Meaning |
|---|---|
value |
The cell to test for emptiness. |
value_if_true |
The result when the cell is empty. |
value_if_false |
The result when the cell holds a value. |
Worked example
A checklist stores notes in B2:B4. The first note cell is still empty.
| A: Task | B: Note |
|---|---|
| Check stock | |
| Count bins | done |
| Seal crate | wait |
Formula: =IF(ISBLANK(B2),"empty","filled")
Result: empty. B2 has no value, so the empty result is shown.
Practice
Cell A2 holds x. In B2, write a formula that shows 1 when A2 is empty and 0 when it is not.
- In B2, write an IF formula that uses ISBLANK and shows 1 when A2 is blank, and 0 otherwise.
- B2 should show the result for x.
Step 1 of 2
Enter =IF(ISBLANK(A2),1,0) in B2.
A2 is x, so the result is 0.
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…
B2 uses ISBLANK.
B2 now shows 0.
The next lesson is Measuring a span between dates.
Related functions
ISBLANK is the function that tests whether the cell is empty.
Common mistake
Leaving IF out, as in =ISBLANK(B2): the cell then shows TRUE or FALSE instead of empty or filled.