Use =IFERROR(your_formula,"") to return a blank cell, but only after you confirm that a real result of 0 should stay visible. Otherwise you can hide valid numbers. If you handle blanks poorly, formulas can look empty while downstream totals, charts, and lookups still treat the cell as text or a hidden error. This guide shows how to return a truly blank result, keep valid zeros, and avoid follow-on calculation problems.

What you'll need

  • An Excel formula that can fail, such as XLOOKUP, VLOOKUP, or INDEX-MATCH.
  • A place to enter the result formula, plus the cells it refers to.
  • One sample case with a true empty cell and one case with a real zero.
  • Basic access to the formula bar so you can edit nested IF, ISBLANK, and IFERROR logic.

How do you return a blank with IFERROR?

Use IFERROR(value, value_if_error) and set the second argument to "". That returns an empty string, which Excel displays as blank. It is the fastest way to hide errors such as #N/A or #DIV/0! without replacing valid results that do not error.

  1. Wrap the formula. Put the original formula inside IFERROR, then add "" as the fallback. For example: =IFERROR(XLOOKUP(A2,Table1[Item],Table1[Price]),"").
  2. Check the output cell. If the source formula errors, the cell will appear blank. If the source formula returns a number, text, or zero, that result stays visible unless it errors.
  3. Confirm downstream behavior. Test a SUM or chart that reads the result range. A blank-looking result from "" can behave differently from a truly empty cell, especially in COUNT and chart series.

Common errors that IFERROR can trap include #N/A, #DIV/0!, #VALUE!, #REF!, #NAME?, #NUM!, and #NULL!. It does not decide whether an input cell is blank; it only reacts after the formula fails.

How do you keep valid zeros?

A spreadsheet table shows a blank result row and a zero result row
If zero is a valid result, do not use alone to decide what should be blank.

If zero is a valid result, do not use IFERROR alone to decide what should be blank. Pair it with a check for blank input or explicit logic in the formula, so a real 0 survives while only error results are hidden. That avoids turning valid zeros into empty-looking cells.

  1. Test the input first. Use IF with ISBLANK when the source cell itself may be empty: =IF(ISBLANK(A2),"",A2*B2). That keeps a blank input blank before the calculation runs.
  2. Protect zero values. If the formula can return zero as a valid answer, separate the zero test from the error test. A common pattern is =IF(A2="","",IFERROR(your_formula,"")), but only when an empty input should suppress the result.
  3. Use a zero-aware branch. For formulas where zero matters, return the calculation directly and only wrap the failing part: =IFERROR(XLOOKUP(A2,Table1[Item],Table1[Qty]),""). This keeps a true zero from being treated as an error.

Say your lookup returns 0 for an item that is out of stock. If you wrap the result with a broad blank rule, that zero disappears from the sheet. If you only trap the error, the zero stays visible and still counts in later formulas.

Blank handling decision table

An Excel table lists salesmen, products, and net sales values
Blank-looking cells and error handling affect whether counts and sums include the result.

Choose the pattern by deciding what should happen when the cell is truly empty, when the formula returns "", when there is an error, and when a real zero is valid. The table below separates those cases so you do not accidentally hide numbers or break counts.

Scenario Recommended formula structure What it displays COUNT / SUM effect
True error only =IFERROR(your_formula,"") Blank-looking result when the formula fails SUM ignores it; COUNT usually ignores text results
Blank input only =IF(ISBLANK(A2),"",your_formula) Blank only when the source cell is truly empty SUM ignores it; COUNT may skip the text result
Blank or error =IF(A2="","",IFERROR(your_formula,"")) Blank for empty input and failed formulas SUM ignores it; COUNT often treats it as text
Valid zero preservation =IFERROR(your_formula,0) or nested zero test before blank logic Shows 0 when zero is the real result SUM includes the zero; COUNT counts the numeric result

Picture a price lookup that should return a blank if the item code is missing, but should still show 0 for a free item. In that case, use the blank-or-error pattern only for the missing code branch, not for the final numeric result.

How do you stop blanks from causing errors?

A spreadsheet screenshot displays an IFERROR formula applied to a lookup function
Wrap the lookup itself with IFERROR when the lookup can fail to stop errors.

Start with IF when the source cell may be empty, use LEN when a formula returns "", and wrap the lookup itself with IFERROR when the lookup can fail. These are different checks. ISBLANK tests true emptiness; LEN(cell)=0 tests a zero-length result that may look blank.

Using IF with ISBLANK

Use this when the referenced cell is truly empty and you want the whole formula to stay blank. =IF(ISBLANK(A2),"",A2*B2) is the basic pattern. It is precise for untouched input cells, and it does not confuse an empty cell with a zero.

  1. Place the input test first. Start with IF(ISBLANK(...),"",...) before the calculation. That prevents a blank reference from feeding the math or lookup.
  2. Return the empty branch. Use "" for the blank branch when you want the cell to appear empty. Use a numeric fallback only if a real zero should display.
  3. Keep the calculation inside. Put the actual math or lookup in the third argument so it only runs when the cell is not truly empty.

Using LEN when formulas return empty strings

Use LEN when the source cell looks blank but may contain a formula result of "". ISBLANK will return FALSE for that cell, because it is not truly empty. A pattern like =IF(LEN(A2)=0,"",your_formula) can separate that case more reliably.

  1. Check the displayed length. Use LEN(A2)=0 if the cell contains a formula that returns an empty string. This catches the hidden text result that ISBLANK misses.
  2. Return the right blank state. If you need the cell to stay visually empty, return "". If a downstream formula must read a true empty cell, move the logic to the source instead of the output.
  3. Recheck charts and counts. A zero-length string can behave like text, so confirm whether COUNT and chart series are reading it the way you expect.

Wrapping lookup formulas with IFERROR

Use this for missing matches in XLOOKUP, VLOOKUP, or INDEX-MATCH. Those formulas commonly produce #N/A when no match exists. IFERROR is a clean outer wrapper when the problem is a missing result, not an empty input.

  1. Wrap the lookup only. Apply IFERROR around the lookup expression, not the entire worksheet chain. Example: =IFERROR(VLOOKUP(A2,Table1,2,FALSE),"").
  2. Use the lookup's native match settings. For exact matches, keep FALSE in VLOOKUP or use the exact-match setting in XLOOKUP. That keeps the error reason clear.
  3. Preserve zero returns. If a matched row can legitimately return 0, leave the lookup result alone and only hide the error branch. Do not convert every zero to blank.

Common mistakes

Most problems come from treating blank-looking output as if it were a true empty cell. "" is not the same thing as an untouched blank cell, and IFERROR does not tell those apart. That difference matters in COUNT, charts, and formulas that test emptiness.

  • Using IFERROR for blank input checks. It only traps errors. If the input is empty but the formula still calculates, IFERROR may not help.
  • Assuming ISBLANK catches "". It does not. A formula that returns an empty string is not a truly empty cell.
  • Hiding valid zero results. A zero can be a real answer, especially in inventory, rates, or counts. Do not blank it out unless the business rule says to.
  • Ignoring downstream formulas. A blank-looking cell can still be text. That can change how COUNT, chart series, and lookups behave.

A common first-timer mistake is using =IFERROR(A1/B1,"") and then wondering why a chart still skips the point. The formula looks blank, but it is still an empty string result, not a true empty cell. If the chart needs a real gap, clear the source cell or redesign the data range.

Keep reading

Frequently asked questions

How do I use IFERROR in Excel to return a blank cell?

Use =IFERROR(your_formula,""). That returns an empty string when the formula errors, which Excel displays as blank. It is the standard pattern for hiding #N/A, #DIV/0!, and similar errors without changing the original formula logic.

How do I make IFERROR leave a cell blank instead of 0?

If the formula itself returns 0, IFERROR will not change it, because zero is not an error. Add explicit logic before the formula, such as =IF(A2="","",IFERROR(your_formula,"")), so blank input stays blank and only true errors are hidden.

How do I stop Excel formulas from showing errors when a referenced cell is blank?

Use =IF(ISBLANK(A2),"",your_formula) when the referenced cell is truly empty. If the blank is actually a formula result of "", switch to LEN(A2)=0. That separates true emptiness from a blank-looking text result.

What is the difference between IFERROR and IF(ISBLANK()) in Excel?

IFERROR reacts after a formula fails. IF(ISBLANK()) checks the input before calculation. Use IFERROR for missing matches or math errors, and use IF(ISBLANK()) when you want blank input to short-circuit the formula.

How do I return a blank only when a formula fails, but keep valid zeros?

Wrap only the risky part of the formula: =IFERROR(risky_formula,""). If zero is a possible valid result, do not convert the output again with a broad blank rule. That keeps 0 visible and only hides the error branch.

Why does my IFERROR formula still show 0 in Excel?

Because 0 is a valid result, not an error. IFERROR does nothing to non-error values. If you need zero to disappear only in a special case, add a separate IF test for that case before the error wrapper.