IF Cell Is Blank in Excel: Formulas That Work
By ExcelReady TeamUpdated 6 min read
The short answer
To test if a cell is blank in Excel, compare it with empty text: =IF(D2="","Not shipped","Shipped"). Two double quotes with nothing between them mean blank. ISBLANK(D2) also works, but it returns FALSE for cells holding an empty string from a formula. To test that a cell is not blank, use D2<>"" instead.
Key takeaways
- =IF(A2="","Blank","Not blank") is the simplest and most forgiving blank test.
- ISBLANK is TRUE only for truly empty cells, not for "" returned by a formula.
- Use <>"" to test that a cell is not blank.
- =IF(B2="","",B2*C2) skips a calculation until the input is filled in.
- A cell with a space is not blank; test LEN(TRIM(A2))=0 to catch it.
On this page+
- How to check if a cell is blank with IF
- How to check if a cell is not blank
- ISBLANK vs ="": which should you use?
- How to skip a calculation until the data is filled in
- How to check several cells for blanks
- Why a cell that looks empty isn't blank
- How to use a fallback value when a cell is blank
- Blank checks with dates and numbers
- Practise it
To check if a cell is blank in Excel, compare it with two double quotes: =IF(A2="","Blank","Not blank"). The "" means empty text, so the test is TRUE when the cell has nothing in it. This guide shows that test and the ISBLANK alternative, explains when they disagree, and covers the most useful pattern of all: leaving a result blank until the data arrives.
How to check if a cell is blank with IF#
Compare the cell with "" inside IF's test:
=IF(D2="","Not shipped","Shipped")The examples use this order sheet in A1:D5:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Order | Qty | Price | Ship date |
| 2 | 5001 | 3 | 12.50 | 20/10/2026 |
| 3 | 5002 | 1 | 40.00 | |
| 4 | 5003 | 6 | 8.00 | 24/10/2026 |
| 5 | 5004 | 15.00 |
Fill the formula from E2 down to E5 (Windows: Ctrl+D; Mac: ⌘D). Orders 5001 and 5003 show Shipped. Orders 5002 and 5004 show Not shipped, because D3 and D5 are empty.
The IF function guide explains the three parts of IF. Here, the only new piece is the "" in the test.
How to check if a cell is not blank#
Flip the operator to <>, which means "not equal to":
=IF(D2<>"","Shipped","Not shipped")This gives the same results as the first formula, written the other way round. Use whichever reads more naturally for your sheet. "If there is a date, it's shipped" is often easier to follow than "if there is no date, it isn't".
ISBLANK vs ="": which should you use?#
ISBLANK is a function that returns TRUE when a cell is completely empty. Inside IF it looks like this:
=IF(ISBLANK(D2),"Not shipped","Shipped")On the order sheet it gives the same results. The difference shows up with formulas. If a cell holds a formula that returns "", it looks empty, but it isn't: it contains a formula.
| Cell holds | A2="" | ISBLANK(A2) |
|---|---|---|
| Nothing | TRUE | TRUE |
A formula returning "" | TRUE | FALSE |
| A single space | FALSE | FALSE |
| 0 | FALSE | FALSE |
So ="" is the safer test in most sheets, because it treats "looks empty" as empty. Use ISBLANK when you really need to know that nobody typed anything. The lesson on IS functions and SWITCH covers ISBLANK, ISNUMBER and ISTEXT together.
How to skip a calculation until the data is filled in#
Return "" when an input is blank, and the calculation only when it isn't. This stops a column of zeros or errors appearing before data arrives.
=IF(B2="","",B2*C2)In F2:F5, this gives 37.50, 40, 48 and a blank for order 5004, which has no quantity yet. Without the IF, F5 would show 0, which looks like a real total of zero.
This pattern keeps reports clean. Other formulas treat the empty text sensibly: SUM and AVERAGE skip it. One catch: if you later do arithmetic directly on the cell, such as =F5+1, the empty text returns #VALUE!. Use SUM(F5,1) or another IF in that case.
How to check several cells for blanks#
To check a whole row, COUNTBLANK counts the empty cells in a range:
=IF(COUNTBLANK(B2:D2)>0,"Incomplete","Complete")Order 5001 is Complete. Orders 5002 and 5004 are Incomplete. COUNTBLANK counts cells with "" from formulas as blank, like the ="" test.
To require all of several cells to be filled, combine tests with AND:
=IF(AND(B2<>"",D2<>""),"Ready to invoice","")To act when any one of them is empty, use OR: =IF(OR(B2="",D2=""),"Missing data",""). The guide to IF with AND explains how these combinations work.
Why a cell that looks empty isn't blank#
Sometimes ="" returns FALSE for a cell that looks empty. The usual causes are:
- A space or other invisible character, often from copied or imported data. Test
=IF(LEN(TRIM(A2))=0,"Blank","Not blank"). TRIM removes spaces and LEN counts what's left. - A zero hidden by formatting. A custom number format can hide zeros, but the cell still holds 0.
- A non-breaking space from web pages. TRIM doesn't remove it, so use
=SUBSTITUTE(A2,CHAR(160),"")first, then test the result.
To find out what's really in a cell, click it and look at the formula bar. =LEN(A2) also tells you how many characters it holds. For text checks beyond blank cells, see IF with text.
How to use a fallback value when a cell is blank#
Sometimes you don't want a message, you want a backup value. Say column B holds an agreed price and column C a list price. Use the agreed price if there is one, otherwise fall back to the list price:
=IF(B2="",C2,B2)If B2 is empty, the formula returns C2; if B2 has a value, it returns B2. You can chain this for several backups: =IF(B2="",IF(C2="","No price",C2),B2) shows No price only when both cells are empty.
The same pattern fills gaps in a report without overwriting the source data. Keep the original column untouched and build the cleaned-up version next to it, so you can always see what was missing.
Blank checks with dates and numbers#
Blank cells behave like 0 in comparisons, which can trick an IF test. If D5 is empty, =IF(D5<DATE(2026,10,1),"Old","New") returns Old, because an empty cell counts as 0, which is the earliest possible date. Always check for blanks first:
=IF(D5="","",IF(D5<DATE(2026,10,1),"Old","New"))The same applies to number ranges; the guide to IF between two numbers has examples. For more on deadlines and due dates, read IF formulas with dates. If you're new to IF itself, start with the IF function explained simply.
Practise it#
Blank checks appear in almost every real spreadsheet and in many Excel tests, often hidden inside a bigger formula. Practise IS functions and SWITCH in a live spreadsheet: you type the formula and it checks it instantly. Then practise the IF function, and take the basic Excel test to check your skills under time pressure.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Order 5002 has no ship date yet. Click E3 and write an IF formula that shows Not shipped if D3 is blank and Shipped if it isn't.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Ship date | |||||
| 2 | ||||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Tip: Test D3="" (two double quotes), then "Not shipped", then "Shipped".
Practise this in a lesson
Frequently asked questions
How do I write an IF formula for a blank cell?
Use =IF(A2="","Blank","Not blank"). The two double quotes mean empty text, so the test is TRUE when A2 has nothing in it.
What is the difference between A2="" and ISBLANK(A2)?
A2="" is TRUE for empty cells and for cells holding an empty string from a formula. ISBLANK(A2) is TRUE only for cells that contain nothing at all, so it returns FALSE for a formula that shows "".
How do I check if a cell is not blank?
Use <>"", for example =IF(A2<>"","Filled","Empty"). Or use =IF(NOT(ISBLANK(A2)),"Filled","Empty").
How do I leave a cell blank if another cell is blank?
Return empty text when the input is blank: =IF(B2="","",B2*C2). The cell stays empty until B2 is filled in.
How do I check if several cells are blank?
Use COUNTBLANK on the range: =IF(COUNTBLANK(B2:D2)>0,"Incomplete","Complete") flags a row with any empty cell. Use =COUNTBLANK(B2:D2)=3 to check that all three are empty.