To check whether a cell is blank in Excel, combine IF with ISBLANK or compare the cell with an empty string.
The right choice depends on whether the cell is truly empty or only looks empty because it contains a formula.
Check whether a cell is truly blank
ISBLANK returns TRUE only when a cell contains nothing: no value, formula, space, or other content.
Wrap it in IF to return a more useful message.
=IF(ISBLANK(A2),"Blank","Not blank")
For this example, Excel checks A2.
If A2 is empty, the formula returns “Blank.” If A2 contains a number, text, a date, or a formula, it returns “Not blank.” Enter the formula in B2 and fill it down to check additional rows.
This test is useful when you need to distinguish genuinely empty cells from cells that contain something, including formulas whose displayed result is empty text.
Check for a blank-looking cell
If you want to treat both an empty cell and a formula that returns an empty string as blank, compare the cell with "":
=IF(A2="","Blank","Not blank")
For example, if A2 is empty, Excel returns “Blank.” It also returns “Blank” if A2 contains a formula such as =IF(C2=0,"",C2) and that formula currently displays nothing.
This comparison is often a better fit for reports and dashboards because it tests what the cell displays.
It also treats a cell containing a zero-length text string as blank.
However, a cell containing one or more spaces is not equal to "", even though those spaces may be hard to see.
Choose between ISBLANK and an empty-string test
- Use
ISBLANK(A2)when only a genuinely empty cell should count as blank. - Use
A2=""when a genuinely empty cell or a formula displaying an empty string should count as blank. - Use
LEN(A2)=0as another way to test whether a cell contains zero displayed characters.
Like the empty-string comparison, it does not treat spaces as blank.
These formulas are available in current desktop editions of Excel and Excel for the web.
IF, ISBLANK, and LEN are long-established worksheet functions and are also supported in older Excel versions.
The basic formulas do not require a Microsoft 365 subscription.
Return a value only when a cell is not blank
A common pattern is to leave the result cell empty until an input is provided.
For example, to calculate a 10% fee on a value in A2 only when A2 is not blank, use:
=IF(A2="","",A2*10%)
If A2 is empty, the formula returns an empty string, so the result cell appears blank.
If A2 contains 200, Excel returns 20.
You can replace 10% with a cell reference, such as $B$1, if the rate is stored in B1:
=IF(A2="","",A2*$B$1)
The formula checks whether A2 is blank-looking before doing the calculation.
If A2 contains text that cannot be multiplied, Excel may return a value error; the blank check does not validate the input type.
Check whether any cell in a range is blank
To flag a row if at least one cell in A2:C2 is blank, use COUNTBLANK:
=IF(COUNTBLANK(A2:C2)>0,"Incomplete","Complete")
COUNTBLANK counts empty cells and formulas that return empty text.
If A2:C2 contains 12, 18, and an empty cell, the formula returns “Incomplete.” If all three cells contain entries, it returns “Complete.”
To require every cell in the range to be filled, the same test works: any blank produces “Incomplete.” For a wider form, adjust the range—for example, A2:H2.
Check that the range covers only fields that are actually required; optional fields will otherwise mark the row incomplete.
Check whether every cell in a range is blank
To return a message only when all cells in A2:C2 are blank, compare the blank count with the number of cells in the range:
=IF(COUNTBLANK(A2:C2)=COLUMNS(A2:C2),"No data","Has data")
COLUMNS(A2:C2) returns 3, so the formula checks whether all three cells count as blank.
It returns “No data” if they do and “Has data” if at least one contains an entry.
For a vertical range, use ROWS instead of COLUMNS, such as ROWS(A2:A10).
Handle cells that contain spaces
A cell with a space is not truly empty, and a basic A2="" test will treat it as not blank.
To ignore ordinary leading and trailing spaces, check the length after applying TRIM:
=IF(LEN(TRIM(A2))=0,"Blank","Not blank")
If A2 is empty or contains only regular spaces, this formula returns “Blank.” If it contains text such as “Ready,” it returns “Not blank.” TRIM also removes extra internal spaces between words, but those do not affect whether the result has zero characters.
TRIM does not remove every character that looks like a space.
Data copied from web pages may contain nonbreaking spaces, which can be represented by CHAR(160).
To remove those as well, use:
=IF(LEN(TRIM(SUBSTITUTE(A2,CHAR(160)," ")))=0,"Blank","Not blank")
This replaces nonbreaking spaces with regular spaces before trimming.
For imported data with other invisible characters, cleaning the source or checking the specific character may be necessary.
Common mistakes to avoid
- Expecting
ISBLANKto detect empty-string formulas: a cell containing=IF(B2=0,"",B2)is not truly empty, soISBLANKreturns FALSE. - Confusing zero with blank: a cell containing
0is not blank.
BothISBLANK(A2)andA2=""identify it as not blank. - Missing invisible spaces: pasted spaces can make a cell appear empty while blank tests report content.
Use a cleanup formula such as theTRIMexample when appropriate. - Using the wrong list separator: many English-language Excel installations use commas between formula arguments.
Some regional settings require semicolons, for example=IF(ISBLANK(A2);"Blank";"Not blank").