Excel has no IF NOT NULL function, but you don't need one. To test whether a cell is empty, wrap the cell reference in IF(A1<>"", value_if_not_empty, value_if_empty) — the two quotation marks with nothing between them mean "blank." That single pattern covers almost every case people mean when they ask for "if not null," and it works in every modern Excel version, including Excel for Microsoft 365, Excel 2021, and Excel for the web. Once you have that, the rest is about choosing what to return, pointing the formula at a range, and knowing when a cell only looks empty. Menu and dialog labels can differ slightly by version and platform, but formula syntax is the same everywhere.

What You'll Need

  • Excel for Microsoft 365, Excel 2021 or later, Excel 2019, or Excel for the web (the formulas below also work in older versions except where noted).
  • A worksheet with at least two columns: one for the values you want to test, one for the result.
  • Awareness that the separator characters may differ: most English-language setups use a comma between arguments, while some regional settings use a semicolon.

Step-by-Step

  1. Pick the cell to test and the cell for the answer. Suppose your data starts in A2 and your result goes in B2. Click B2 so the cell is selected and the formula will land in the right place.
  2. Type the basic test. Enter =IF(A2<>"","Not empty","Empty") and press Enter. The <> operator means "not equal to," and "" is an empty text string, so the test reads "if A2 is not equal to nothing." Excel returns "Not empty" when A2 holds anything at all and "Empty" when it holds nothing.
  3. Decide what each branch should return. If you want the original value back rather than a label, use =IF(A2<>"",A2,"Missing"). If you want a calculation on the value, put it in the second argument, for example =IF(A2<>"",A2*2,"Missing").
  4. Swap the test if you want the reverse. Testing for a blank is shorter: =IF(A2="","Missing",A2). Both forms give the same result; pick the one that reads clearly to you. The ISBLANK function is a third option: =IF(ISBLANK(A2),"Missing",A2).
  5. Fill the formula down. With B2 selected, drag the small square at the bottom-right corner down the column, or double-click it to fill to the end of the adjacent data. Column references adjust automatically, so B2's A2 becomes A3, then A4, and so on.
  6. Wrap it in IFERROR if the value could be a formula result. A cell that contains #N/A or #DIV/0! is not empty, so a "not empty" test will pass it through. If you would rather treat errors as missing, use =IFERROR(IF(A2<>"",A2,"Missing"),"Missing").
  7. Check for cells that only look empty. A formula returning "" is not truly blank: ISBLANK returns FALSE on it, while the <>"" test treats it as empty. A cell containing a space or a non-breaking space (common after pasting from web pages) also passes the "not empty" test. Clear those with Find and Replace: select the column, open Home > Find and Select > Replace, search for a single space and replace with nothing.
  8. Test the result on a few known rows. Type something into an empty cell and watch the result change, then delete it and watch it change back. This confirms the formula points where you think it does before you rely on it across hundreds of rows.

Common Mistakes

  • Typing a space between the quotes. " " is a string containing a space, so it tests for a space rather than for blank. Keep the quotes touching.
  • Omitting the quotes entirely. Writing A2<> with nothing after it is a syntax error. Excel needs the empty string "".
  • Mixing up <> and =. <> means "not equal." Using = flips the logic, so be sure the true and false results match the test you wrote.
  • Using ISBLANK on formula cells. ISBLANK only returns TRUE for genuinely empty cells. If the cell contains a formula that returns empty text, ISBLANK says FALSE. Use =A2"" when you want to catch both.
  • Assuming null and zero are the same. A cell holding 0 is not empty, so an "if not null" test passes it through. If zero should count as missing, add OR(A2=0,...) to the test.
  • Pasting the formula as text. If the formula shows as text instead of calculating, the cell is probably formatted as Text. Set the format to General and re-enter the formula, or use Data > Text to Columns and click Finish.

Tips

  • Name the blank test once. Put your test in a cell and reference it from other formulas so you only change the logic in one place later.
  • For a whole column, COUNTBLANK and COUNTA quickly tell you how many cells are empty versus filled. =COUNTBLANK(A2:A100) counts empties; =COUNTA(A2:A100) counts non-empty cells.
  • Conditional formatting can highlight the gaps for you: select the range, choose Home > Conditional Formatting > New Rule > Use a formula, and enter =A2="" to shade empty cells.
  • In Excel 365, IF combined with LET keeps long formulas readable: define the test once and reuse it in both branches.
  • If you are filtering rather than calculating, the column's filter dropdown has a (Blanks) entry that shows only empty cells, which is often faster than a formula for a one-off check.

Troubleshooting

  • The formula returns #NAME? Check the function name is spelled correctly and that quotes are straight ("), not curly (“ ”) from a word processor. Retype the quotes.
  • Every row says "Not empty." Your cells probably contain spaces or invisible characters. Clear them with Find and Replace as described above, then recheck.
  • Every row says one result regardless of content. You may have locked the reference with dollar signs ($A$2) before filling down, so every row tests the same cell.
  • The result shows 0 instead of blank. An empty second argument returns 0. Use "" where you want nothing displayed.
  • Error is a semicolon versus comma problem. If Excel rejects your formula, replace commas with semicolons and retry; that is a regional setting, not a mistake on your part.
  • Numbers are stored as text. LEFT, RIGHT and MID always return text, so the result may be left-aligned and ignored by SUM. Wrap the branch in VALUE if you need a number.

Frequently Asked Questions

Is there an IF NOT NULL function in Excel?

No. Excel handles blanks with the comparison operators instead: IF(A1<>"",...) for "not empty" and IF(A1="",...) for "empty." You can also use ISBLANK inside IF.

What is the difference between ISBLANK and checking for ""?

ISBLANK is TRUE only when the cell truly contains nothing. Checking =A1"" is also TRUE for a formula that returns empty text, so it catches more cases.

How do I return the value only if a cell has something in it?

Use =IF(A1<>"",A1,""). The second argument hands back the original value, and the third leaves the result empty when the source is blank.

Does an IF NOT NULL formula treat zero as blank?

No. A zero is a value, so it passes the "not empty" test. Add an explicit zero check with OR if zero should be treated as missing.

Why does my cell look empty but the formula says it isn't?

Almost always a space, a line break, or a non-breaking space from a paste. Find and Replace, or TRIM, removes those characters.