To test whether a cell is genuinely empty in Excel, use =ISBLANK(A1), replacing A1 with the cell you want to check. If the cell might contain a formula that displays an empty string, use =A1="" instead; it treats a truly empty cell and a formula result of “” as empty for the comparison.
These tests answer slightly different questions, so choosing the right one matters. ISBLANK checks whether a cell has no contents at all, while the comparison checks what value the cell returns. That distinction helps prevent misleading results in reports, lookups, and formulas that react to missing data.
How ISBLANK works
With the cell to test in A1, enter =ISBLANK(A1) in another cell. The function returns TRUE if A1 is genuinely empty and FALSE if A1 contains a value, text, a space, or a formula. It reports the cell’s contents, not whether the cell looks blank on screen.
For example, suppose A1 has never been used. ISBLANK returns TRUE. If you type a space in A1, the cell may look empty, but ISBLANK returns FALSE because the space is content. If A1 contains a formula such as =IF(B1=0,"","Ready") and that formula currently returns an empty string, ISBLANK still returns FALSE: A1 contains a formula.
This makes ISBLANK useful when the question is specifically, “Has anything been entered or placed in this cell?” It is less useful when you want to treat formula-generated empty strings as blanks in later calculations.
Use an empty-string comparison for displayed blanks
With the value to inspect in A1, enter =A1="" to return TRUE when A1 is empty or its formula result is an empty string. Excel’s double quotation marks enclose a zero-length text value; there is nothing between them. The formula returns FALSE for ordinary text or a number such as 0.
To show a label instead of TRUE or FALSE, with the cell to inspect in A1, enter =IF(A1="","Blank","Not blank"). If A1 is genuinely empty or returns an empty string from a formula, the result is Blank. If A1 contains 0, the result is Not blank. You can replace those labels with any text or follow-on calculation that suits the worksheet.
A cell that looks blank because its font color matches its fill, its contents are hidden by formatting, or its column is too narrow is not necessarily empty. An empty-string comparison checks the cell’s returned value; it does not check how the cell is formatted or whether its content is visible.
Choose the test for the job
Use the test that matches what you mean by “empty.” These are the common cases:
- Only cells that have never had contents: Use ISBLANK. A formula, a space, or a value makes the result FALSE.
- Cells that are empty or display an empty result: Compare the cell with
"". This also recognizes a formula that returns an empty string. - Cells that contain only ordinary spaces: Trim the spaces before checking the length. With the text to test in A1, use
=LEN(TRIM(A1))=0. This returns TRUE for an empty cell, an empty string, or text made only of regular spaces. - Count blank cells in a range: Use COUNTBLANK, described below. It counts genuinely empty cells and cells whose formulas return empty text.
These choices are not interchangeable. For instance, a data-entry check may need ISBLANK so that a formula in a required field does not count as “not entered.” A summary that should ignore formulas returning an empty string may need the comparison instead.
Check for spaces and other invisible characters
A common surprise is that a cell can look empty but fail both ISBLANK and a simple empty-string comparison. A single regular space is still text, so =A1="" returns FALSE for it. If ordinary spaces are common in imported or manually entered data, TRIM can remove them for the test.
With the cell to test in A1, enter =LEN(TRIM(A1))=0. TRIM removes leading and trailing regular spaces and reduces repeated spaces between words to a single space. LEN then measures what remains. If A1 contains only spaces, the result is zero characters, so the formula returns TRUE. If A1 contains a word, it returns FALSE.
TRIM does not remove every character that can look like a space. In particular, a nonbreaking space, often encountered in copied web content, may remain. With the text to inspect in A1, use =LEN(TRIM(SUBSTITUTE(A1,CHAR(160),"")))=0 to remove character 160 as well as ordinary spaces before checking. This targets that particular character; other hidden characters may require a different cleanup step. If the result still seems unexpected, inspect the source data or use Excel’s text-cleaning tools rather than assuming the cell is truly empty.
Count empty cells in a range
To count empty cells in a range, use COUNTBLANK. With the cells to check in A2:A20, enter =COUNTBLANK(A2:A20). If five cells in that range are genuinely empty and two more contain formulas returning an empty string, the result is 7. COUNTBLANK counts both types.
That behavior is useful for reports where a formula-generated blank should count as missing. It is not the same as counting only cells with no contents whatsoever. If you need that stricter count, test each cell with ISBLANK rather than relying on COUNTBLANK. For example, with the cells to inspect in A2:A20, use =SUMPRODUCT(--ISBLANK(A2:A20)). The formula counts only genuinely empty cells in that range; formula cells returning “” are not included.
When using a range formula, keep the range limited to the relevant rows. Counting an entire column can include many unused cells and may make a summary less meaningful, even though Excel can calculate it.
Use the test in a larger formula
Blank tests are often used to prevent a result from appearing until someone enters the needed information. With an input in A2 and a value to calculate in B2, enter =IF(A2="","Enter a value",B2*2) in C2. If A2 is empty or returns an empty string, C2 displays Enter a value; otherwise it doubles B2. This example assumes B2 contains a usable number whenever A2 is populated.
Be careful about what the test is guarding. If A2 contains a space, the empty-string comparison regards it as nonempty, and the formula will use the other branch. If users may type spaces accidentally, use a TRIM-based test. With the input in A2, enter =IF(LEN(TRIM(A2))=0,"Enter a value",B2*2) in C2. This treats an empty cell or one containing only ordinary spaces as missing.
For formulas that should return an empty string when an input is missing, an empty-string test can make later formulas easier to read. However, the cell still contains a formula, so ISBLANK will not identify it as a truly empty cell. Keep that distinction in mind when combining formulas from different parts of a workbook.
Common mistakes and troubleshooting
- Expecting ISBLANK to detect a formula result of “”: It returns FALSE because the cell contains a formula. Compare the cell with
""when you want to treat that result as empty. - Confusing zero with a blank: The number 0 is a value. ISBLANK and an empty-string comparison return FALSE for a cell containing 0. If zero should count as missing in your particular worksheet, include that rule explicitly rather than treating every zero as blank by accident.
- Overlooking spaces: A space is text, not an empty cell. Use a TRIM-based test if ordinary spaces should be ignored.
- Trusting appearance alone: Formatting can hide a value without removing it. Select the cell and look at the formula bar to help identify whether it contains a value or formula.
- Using the wrong reference: If you copy a test down a column, a relative reference such as A1 normally changes to A2, A3, and so on. Check that the first formula points to the intended cell before filling it down.
In Microsoft 365 for Windows, type a formula in a worksheet cell and press Enter. To fill it into adjacent rows, drag the fill handle or copy and paste. The formula syntax is the same in Excel for Mac and Excel for the web; ribbon layouts and some keyboard shortcuts can differ, but these functions work in all three.
Frequently Asked Questions
What is the formula to check if a cell is empty in Excel?
Use =ISBLANK(A1) when A1 must have no contents at all. Use =A1="" when you also want to treat a formula that returns an empty string as empty.
Why does ISBLANK return FALSE when the cell looks empty?
The cell may contain a formula returning “”, a space, or another invisible character. ISBLANK checks whether the cell has contents, not whether those contents are visible. Try the formula bar or a comparison with an empty string to diagnose the difference.
Does Excel consider 0 a blank cell?
No. Zero is a numeric value, so ISBLANK returns FALSE and a comparison such as =A1="" also returns FALSE when A1 contains 0. Treat zero as missing only if that matches the meaning of your data.
How do I count blank cells, including formulas that return nothing?
Use COUNTBLANK on the range. With cells A2:A20 to count, =COUNTBLANK(A2:A20) includes genuinely empty cells and cells whose formulas return an empty string.
How can I test whether a cell contains only spaces?
With the cell in A1, use =LEN(TRIM(A1))=0 for ordinary spaces. If the data may include nonbreaking spaces copied from a web page, remove character 160 with SUBSTITUTE as shown above.
Practical rule of thumb
Start with ISBLANK when you mean “this cell contains nothing.” Choose an empty-string comparison when a formula-generated blank should also count as empty, and use TRIM when spaces may be present. For a range-wide count that includes formula results of “”, COUNTBLANK is the direct option. A small test on a known blank, a formula-generated blank, a space, and zero can confirm that the selected rule matches your worksheet before you copy it through a larger report.
Related
- Data Validation Named Range in Excel: Setup and Fixes
- Data Validation Reference Table in Excel
- Remove Duplicates in Power Query: A Practical Guide
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- SUMIFS Won’t Work: Causes and FixesSUMIFS usually fails because its ranges do not line up, its criteria do not match the values in…
- Excel INDIRECT Sheet Name: Build Dynamic Sheet ReferencesTo use a cell’s text as a worksheet name in Excel, combine it with the cell or range…
- Weighted Average Calculator in Excel: Formula & ExamplesTo calculate a weighted average in Excel, multiply each value by its corresponding weight, add those products, and…
- Excel Sort Dates From Earliest to Latest: A Clear GuideTo sort dates in Excel from earliest to latest, select a cell in your date column, then choose…
- Excel SUM Without Hidden Cells: Which Formula to UseTo sum only visible rows in Excel, use SUBTOTAL with function number 109. With amounts in B2:B6 and…
- Excel ABS Function: How to Return a Positive ValueTo turn a negative number into a positive one in Excel, use the ABS function: it returns the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.