The direct answer: use =IF(A1="","Empty","Not Empty") to check if a cell is empty, or =ISBLANK(A1) to return TRUE or FALSE. For counting empty cells in a range, use =COUNTBLANK(A1:A10).
Why “Empty” Is Trickier Than It Looks
In Excel, a cell can look empty but actually contain something. A formula that returns an empty string like ="" displays as blank, but the cell is not truly empty. The ISBLANK function returns FALSE for such cells because it checks for truly empty cells—no formula, no value, no space. The ="" comparison, however, treats a formula that returns an empty string as equal to an empty string, so =IF(A1="","Empty","Not Empty") will return “Empty” for a cell with ="".
This distinction matters when you clean data or build dashboards. For example, if you import data and blank cells are actually formulas returning “”, COUNTBLANK will count them as blank (because it counts cells that contain “” as well), but ISBLANK will not. Knowing which function to use depends on what you mean by “empty.”
Using ISBLANK to Test a Single Cell
The ISBLANK function is the most straightforward way to test if a cell is truly empty. It returns TRUE if the cell contains nothing, and FALSE if it contains anything at all—including a formula that returns an empty string, a space, or a zero-length text. Syntax: =ISBLANK(value).
Example: with cell A1 empty, =ISBLANK(A1) returns TRUE. If A1 contains =IF(1=2,""), the cell displays blank but ISBLANK(A1) returns FALSE.
Where it shines: when you need a logical test in functions like IF, AND, or conditional formatting. For instance, to highlight truly empty cells in a range, select the range, go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format, and enter =ISBLANK(A1) (adjusting the reference to the active cell). This will format only truly empty cells, not those with formulas returning “”.
Using IF with “” for Flexible Checks
Often you want to treat a cell as “empty” if it looks blank, regardless of whether it contains a formula returning “”. The comparison =A1="" does exactly that. It returns TRUE if the cell is truly empty OR if it contains a formula that evaluates to an empty string. It also returns TRUE if the cell contains a formula that returns an empty string, but it returns FALSE if the cell contains a space (” “) or a non-breaking space (CHAR(160)).
Example: Suppose you have a list of names in A2:A20 and some cells have formulas that return “” if no name is entered. To return “No name” for those, use: =IF(A2="","No name",A2) in B2 and copy down. This treats both truly empty cells and formula-returning-“” cells as “No name.”
If you need to also treat cells with spaces as empty, you can use =IF(TRIM(A2)="","No name",A2) because TRIM removes leading/trailing spaces, then the comparison checks if the result is “”.
Counting Empty Cells: COUNTBLANK
To count how many cells in a range are blank (including those with formulas returning “”), use COUNTBLANK(range). For example, =COUNTBLANK(A1:A10) returns the number of cells in A1:A10 that are truly empty or contain “”. Note that COUNTBLANK does not count cells with spaces or non-breaking spaces.
If you need to count truly empty cells only (excluding formula-returning-“”), you can use =COUNTIF(A1:A10,"") which counts cells that equal an empty string. But this also counts formula-returning-“”. To count truly empty cells only, use =ROWS(A1:A10)-COUNTA(A1:A10) but that counts cells with spaces as non-empty. A more precise way: use =SUMPRODUCT(--ISBLANK(A1:A10)) which counts cells where ISBLANK is TRUE.
Example: If A1:A5 contain values, A6 is truly empty, A7 contains a space, and A8 contains =IF(1=2,""), then COUNTBLANK(A1:A8) returns 2 (A6 and A8), COUNTIF(A1:A8,"") returns 2, and SUMPRODUCT(--ISBLANK(A1:A8)) returns 1 (only A6).
Common Problems and Misconceptions
- Spaces are not empty: A cell with a space looks blank but is not empty. Use
=IF(TRIM(A1)="","Empty","Not Empty")to treat spaces as empty. - Non-breaking spaces: Imported data sometimes contains CHAR(160) which looks like a space but is not trimmed by TRIM. Use
=IF(SUBSTITUTE(A1,CHAR(160),"")="","Empty","Not Empty"). - ISBLANK with arrays: In older Excel, ISBLANK does not work directly on ranges in array formulas without SUMPRODUCT, but in Excel 365 it works with dynamic arrays.
- Zero-length strings from formulas:
COUNTBLANKcounts them, butISBLANKdoes not. This often surprises users. - Conditional formatting: Using
ISBLANKin conditional formatting will not highlight cells with formulas returning “”, which may be unexpected.
Choosing the Right Approach
Pick the method based on what you want to treat as “empty”:
- Truly empty cells only: Use
ISBLANKorSUMPRODUCT(--ISBLANK(range)). - Visually blank (including formula “”): Use
=A1=""orCOUNTBLANK. - Blanks plus spaces: Use
=TRIM(A1)=""or=IF(TRIM(A1)="","Empty","Not Empty"). - Blanks plus non-breaking spaces: Use
=SUBSTITUTE(A1,CHAR(160),"")="".
For example, in a data validation list, you might want to allow truly empty cells but not spaces. Use data validation with a custom formula: =OR(ISBLANK(A1),A1<>" ").
Alternatives: IFERROR and IFNA
Sometimes you want to return a blank when a formula errors. Instead of checking if a cell is empty, you use IFERROR to handle errors. For example, =IFERROR(VLOOKUP(D2,A:B,2,FALSE),"") returns an empty string if the lookup fails. This is not the same as checking emptiness, but it’s a common related need.
Similarly, IFNA handles only #N/A errors: =IFNA(VLOOKUP(D2,A:B,2,FALSE),"").
If you want to avoid blank cells altogether, you can use =IFERROR(...,0) to return 0 instead of an empty string.
Frequently Asked Questions
How do I check if a cell is empty in Excel?
Use =ISBLANK(A1) to return TRUE if A1 is truly empty. If you want to treat cells with formulas that return “” as empty, use =A1="".
What is the difference between ISBLANK and COUNTBLANK?
ISBLANK tests a single cell and returns TRUE/FALSE. COUNTBLANK counts empty cells in a range, including cells with formulas that return “”. ISBLANK does not count formula-returning-“”.
Why does my IF formula not work with empty cells?
Often because the cell contains a space or a non-breaking space. Use =IF(TRIM(A1)="","Empty","Not Empty") to ignore spaces. If it still fails, check for CHAR(160) with =IF(SUBSTITUTE(A1,CHAR(160),"")="","Empty","Not Empty").
How do I count truly empty cells only?
Use =SUMPRODUCT(--ISBLANK(A1:A10)). This counts cells where ISBLANK returns TRUE, excluding formula-returning-“”.
Can I use ISBLANK in conditional formatting?
Yes. Select the range, go to Home > Conditional Formatting > New Rule > Use a formula, and enter =ISBLANK(A1) (adjusting the reference). Note it will not highlight cells with formulas returning “”.
How do I make a formula return a blank cell instead of 0?
Use =IF(condition,"",0) or simply ="" as the false branch. For example, =IF(A1>10,A1,"") returns an empty string if A1 is not greater than 10.
Related
- Java Random Number in Interval: How-To
- Google Sheets Query Select Multiple Columns
- Windows Shortcut Undo: Keys & How to Reverse Actions
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel COUNTIF Equals Cell: Formula & ExamplesYes, you can use COUNTIF to count cells that equal a value stored in another cell. The formula…
- VLOOKUP More Than One Value: 4 Real MethodsYes, you can look up more than one value with VLOOKUP, but the classic function only returns a…
- Change Capital to Lowercase in Excel: Formulas and TipsTo change capital letters to lowercase in Excel, use the LOWER function in a blank column: with the…
- Excel AGGREGATE Formula: Two Practical Examples ExplainedUse Excel’s AGGREGATE function to calculate a result while choosing whether to ignore errors, hidden rows, or both.…
- Excel INDEX MATCH Duplicates: How to Handle ThemYes, Excel’s INDEX MATCH can return duplicate values, but the way it handles them depends on your formula…
- COUNTIF Conditional Formatting: How to Use ItTo apply conditional formatting with COUNTIF, select your data range, go to Home > Conditional Formatting > New…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.