To test whether a cell is not empty in Excel, use the formula =IF(A1<>"","Not empty","Empty"). The expression A1<>"" returns TRUE when A1 contains any value, including a formula that returns an empty string, and FALSE only when A1 is truly blank. For a simple TRUE/FALSE result, use =A1<>"" on its own. This guide shows how to apply that test, avoid the common traps, and adapt it to ranges, conditional formatting, and data validation.

What You'll Need

  • Excel 2016 or later, Excel for Microsoft 365, or Excel for Mac (the formulas work the same; menu labels can differ slightly by version, device, or region).
  • A worksheet with at least one column of data to test.
  • Basic familiarity with entering formulas and using the fill handle.

Step-by-Step

  1. Pick a helper column. Click the header of the column immediately to the right of your data (for example, column B if your data is in column A). This keeps the result next to the cell being tested.
  2. Enter the basic test. In the first empty cell of that column, type =A2<>"" and press Enter. Excel returns TRUE if A2 has any content and FALSE if A2 is blank. The double quotes with nothing between them represent an empty string, and <> means "not equal to".
  3. Wrap it in IF for readable output. Replace the formula with =IF(A2<>"","Not empty","Empty"). This returns the words instead of TRUE/FALSE, which is easier to scan and to use in later formulas.
  4. Fill down the column. Select the cell with the formula, hover over the small square at its bottom-right corner until the cursor becomes a black cross, then double-click or drag down to the last row of your data. Excel adjusts the row references automatically.
  5. Test a whole range at once (optional). To count how many cells are not empty, use =COUNTA(A2:A100). COUNTA counts any cell that contains text, numbers, errors, or formulas, but not truly blank cells. To count only cells that are not empty and not a formula returning "", use =SUMPRODUCT(--(A2:A100<>"")).
  6. Apply the test to conditional formatting. Select the range you want to highlight, go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format, and enter =A2<>"" (without the IF wrapper). Choose a fill color and click OK. Non-blank cells in the range will be highlighted.
  7. Use the test in data validation (optional). Select the cells where you want to require an entry, go to Data > Data Validation, choose Custom, and enter =A2<>"". This prevents users from leaving the cell blank. Note that data validation does not catch cells that already contain a space character; see Common Mistakes below.
  8. Combine with other functions. For example, =IF(AND(A2<>"",B2<>""),"Complete","Missing data") checks two cells at once. You can nest the not-empty test inside SUMIF, COUNTIF, or FILTER to process only rows that have data.

Common Mistakes

  • Confusing blank with empty string. A cell containing a formula that returns "" looks blank but is not truly empty. A1<>"" returns FALSE for it, which is usually what you want. If you need to detect only truly blank cells, use =ISBLANK(A1).
  • Forgetting spaces. A cell with a single space is not empty by Excel's rules, so A1<>"" returns TRUE. Use =TRIM(A1)<>"" to treat space-only cells as empty.
  • Using the wrong comparison operator. Typing =A1="" tests for empty, not not-empty. The correct not-empty test is <>"".
  • Mixing absolute and relative references. When filling down, $A$1 stays fixed while A1 changes. If every row should test the same cell, lock the reference with dollar signs.
  • Assuming COUNTA ignores formulas. COUNTA counts formula results, including empty strings. If you need to exclude those, use SUMPRODUCT(--(range<>"")) or COUNTIF(range,"?*")+COUNT(range) depending on whether you are counting text, numbers, or both.

Tips

  • Use LEN(A1)>0 as an alternative not-empty test. It returns TRUE for any character, including a space, so combine it with TRIM if spaces are a concern.
  • For dynamic arrays in Microsoft 365, =FILTER(A2:A100,A2:A100<>"") returns only the non-blank rows in one step.
  • Name your helper column clearly (for example, "Has Data") so the TRUE/FALSE results are self-explanatory.
  • When sharing a workbook, avoid helper columns that contain volatile formulas if the file is large; COUNTA and simple comparisons are fast.
  • Remember that Excel treats cells with only formatting (such as a fill color) as empty for formula purposes.

Troubleshooting

  • The formula returns TRUE for a cell that looks empty. The cell likely contains a space, an apostrophe, or a formula returning an empty string. Select the cell and check the formula bar. Use =TRIM(A1)<>"" to ignore spaces, or =ISBLANK(A1) to test for truly blank cells.
  • The formula returns FALSE even though there is text. Check for leading or trailing spaces in the cell, and confirm the cell reference points to the right row. If the text is the result of a formula that returns "", the cell is not considered empty by <>""; use =LEN(A1)>0 instead.
  • Conditional formatting highlights the wrong cells. Make sure the formula uses relative references (no dollar signs unless intended) and that the "Applies to" range starts at the same row as the formula. For example, if the range is A2:A100, the formula should reference A2, not A1.
  • Data validation rejects valid entries. The custom formula must return TRUE for allowed entries. If you use =A2<>"", any non-empty entry passes. If you also want to restrict length, combine with LEN, for example =AND(A2<>"",LEN(A2)<=50).
  • The fill handle does not copy the formula correctly. Check that the cell references are relative (no $ signs) if you want them to change per row. If the formula references another sheet, include the sheet name and an exclamation mark, such as Sheet2!A1.

Frequently Asked Questions

What is the difference between ISBLANK and <>""?

ISBLANK returns TRUE only for truly empty cells. The <>"" test returns TRUE for any cell that is not an empty string, including cells with formulas that return text or numbers. Use ISBLANK when you need to detect untouched cells; use <>"" when you want to know if a cell has any visible content.

How do I count non-empty cells in a range?

Use =COUNTA(range) to count cells with any content, including errors and formulas. To exclude cells that contain only a formula returning "", use =SUMPRODUCT(--(range<>"")).

Can I use the not-empty test in SUMIF?

Yes. For example, =SUMIF(A2:A100,"<>",B2:B100) sums values in column B where the corresponding cell in column A is not empty. The criteria "<>" means "not equal to empty".

Why does my formula show FALSE for a cell with a formula?

If the cell's formula returns an empty string (""), Excel treats it as empty for the <>"" test. To detect any formula, use =ISFORMULA(A1) instead.

Does the not-empty test work in Excel for Mac?

Yes, the formulas are identical. Menu paths may differ slightly; for example, Conditional Formatting is under the Home tab on both platforms, but dialog wording can vary by version.

Can I use this test in Google Sheets?

Yes, Google Sheets supports the same <>"" syntax and functions like COUNTA and SUMPRODUCT. The behavior for cells with formulas returning empty strings is the same.