IFERROR Fix #DIV/0! and #N/A With 0 or Blank in Excel & Sheets

Keep tables, ratios, and summary totals clean by replacing #DIV/0!, #N/A, and #VALUE! errors with 0, a blank cell, or clear text.

Quick Formula: Replace #DIV/0! or #N/A With 0

Wrap any formula inside IFERROR(formula, fallback) so errors display a clean value instead of breaking reports:

=IFERROR(A2/B2, 0)

To leave the cell visually blank instead of showing 0 when an error happens, use "" as the second argument:

=IFERROR(A2/B2, "")

Worked Example: Division When Denominator Is Zero or Blank

Cell A2 (Spend) Cell B2 (Conversions) Raw =A2/B2 =IFERROR(A2/B2, 0)
$500 25 $20.00 $20.00
$500 0 #DIV/0! 0
$200 (blank) #DIV/0! 0

Practical Rules for Using IFERROR Safely

Try It Live: Customize your division or lookup formula in the Formula Finder, or review XLOOKUP's built-in fallback option.
Editorial & Accuracy Note: Tested across Microsoft Excel and Google Sheets. Part of the Know Unlimited Excel & Google Sheets Hub.