You can create a "not empty" condition in Excel using the formula =NOT(ISBLANK(cell)). This returns TRUE if the cell contains any value (text, number, date, or an error) and FALSE if the cell is blank. You can then use this result in other formulas like IF or filter data. First, ensure your data is in a standard table format.
What You'll Need
- A computer with Microsoft Excel installed (2010 or later versions are recommended for the best compatibility with newer functions).
- The spreadsheet containing the data you want to check.
- A basic understanding of cell references (e.g., A1, B2).
Step-by-Step
- Open your Excel workbook and navigate to the sheet containing the data you want to analyze.
- Identify the target cell. Click on the cell where you want the result of your "not empty" check to appear.
- Enter the formula. Type the following into the formula bar (or directly into the cell):
=NOT(ISBLANK(A1))
- Adjust the cell reference. Replace
A1with the actual cell address you want to check. For example, if you want to check cell B5, type=NOT(ISBLANK(B5)). - Press Enter. Excel will calculate the result. If the cell is blank, it will show FALSE. If it contains data, it will show TRUE.
- Drag the fill handle. To apply this check to a whole column or row of data, click the bottom-right corner of the cell with your formula and drag it down or across to the other cells.
- Use the result in other formulas. You can now use the result of this formula as a condition. For example, to sum only the non-empty cells in column A, you could use:
=SUMIF(A:A, "<>", B:B). This sums column B for every row where column A is not empty.
Common Mistakes
- Using only ISBLANK. If you just use
=ISBLANK(A1), you get TRUE for blank cells and FALSE for non-blank cells. However, if you need to treat TRUE as a positive condition (e.g., "show me data"), you must wrap it in NOT to flip the logic. Using=ISBLANK(A1)directly in a SUMIF range often leads to counting empty cells as if they were data. - Ignoring hidden rows. A formula like
=NOT(ISBLANK(A1))only checks the visible cell. If you filter your data or hide rows, the formula will still calculate based on the underlying data, even if that data is not currently visible. - Incorrect cell references. Forgetting to lock the cell reference when dragging the formula (e.g., using A1 instead of $A$1) will cause the formula to check different cells than intended.
Tips
- Combine with IF for conditional logic. The most powerful use case is nesting this formula inside an IF function. For example:
=IF(NOT(ISBLANK(A1)), "Data Found", "Blank"). This will display "Data Found" if the cell has content, and "Blank" if it does not. - Use the "<>" operator. For many conditional formatting or filtering tasks, you don't strictly need the complex NOT(ISBLANK) function. You can often achieve the same result using the "not equal to" operator. For instance, to count non-empty cells, use
=COUNTIF(A:A, "<>"). This counts any cell that is not equal to nothing. - Check for formulas returning empty strings. Sometimes a cell looks empty because it contains a formula like
=""(an empty string). ISBLANK will return FALSE in this case because the cell technically contains a formula. If you need to catch these, you would need a more complex formula involving ISTEXT or checking for the specific formula result.
Troubleshooting
If your formula is not behaving as expected, check these common issues:
- Result showing FALSE when data is visible. Ensure that the cell you are checking does not contain only spaces. A cell with 10 spaces looks empty to the human eye, but ISBLANK returns FALSE. You can verify this by clicking the cell and pressing the Delete key to clear it.
- Formula not updating. If you type the formula correctly but the result does not change, check that Automatic Calculation is enabled. Go to the Formulas tab in the ribbon and ensure "Automatic" is selected in the Calculation Options group.
- Error values (e.g., #NAME?). If you see an error, double-check your spelling.
ISBLANKis a specific function name and must be spelled exactly as written. Also, ensure you are not missing a closing parenthesis.
Frequently Asked Questions
- Can I use NOT ISBLANK to filter data? Yes. In the Data tab, use the Filter dropdown on the header row. In the dropdown menu, uncheck the "Blanks" option. This will hide all empty rows, effectively filtering for non-empty data.
- What is the difference between ISBLANK and ISTEXT? ISBLANK checks if a cell contains absolutely nothing (no value, no formula, no spaces). ISTEXT checks if the cell contains any text characters. A cell with the number 5 is not text, but it is also not blank.
- Does NOT ISBLANK work in Google Sheets?
Yes. The syntax
=NOT(ISBLANK(A1))works exactly the same way in Google Sheets as it does in Microsoft Excel. - How do I check if a cell contains either text or a number? The NOT(ISBLANK) function works for both. If the cell contains any value—whether it is a string of text, a number, a date, or a boolean value—it will return TRUE.
- Why does my formula return TRUE for a cell that looks blank? As mentioned in the tips, this often happens if the cell contains a formula that results in an empty string (e.g., a lookup that returns nothing). It can also happen if the cell contains only non-printing characters or hidden spaces that you cannot see.