Services
Study guides
Free tools
#DIV/0! appears when a formula divides by zero or by an empty cell. Excel treats a blank denominator as zero. Check the denominator, exclude blank rows, or return a controlled blank with IFERROR.
The short answer
#DIV/0! appears when a formula divides by zero or by an empty cell. Excel treats a blank denominator as zero. Check the denominator, exclude blank rows, or return a controlled blank with IFERROR.
Test the denominator before dividing. This keeps a real zero visible as blank instead of turning the whole report into an error.
=IF(B2=0,"",A2/B2)IFERROR is shorter and also catches other errors, which is useful on dashboards. Do not use it to hide a mistake in the source data.
=IFERROR(A2/B2,"")If blank rows are normal, calculate only rows with a denominator: =IF(B2="","",A2/B2). For a whole column, use FILTER or a pivot table.
A missing lookup may return 0 or blank. Fix the lookup first, then add the divide-by-zero guard.
=IFERROR(A2/XLOOKUP(D2,$A$2:$A$500,$B$2:$B$500),"")=IF(B2=0,"",A2/B2)Shows a blank instead of #DIV/0! when the denominator is zero or empty.
Paste the formula into the free browser tools to see the exact fix without uploading your file. The Error Fixer explains the code, the Formula Checker finds syntax problems, and the Formula Explainer breaks down nested logic.
#DIV/0! appears when a formula divides by zero or by an empty cell. Excel treats a blank denominator as zero. Check the denominator, exclude blank rows, or return a controlled blank with IFERROR.
Guard the denominator: Test the denominator before dividing. This keeps a real zero visible as blank instead of turning the whole report into an error. Use IFERROR for reports: IFERROR is shorter and also catches other errors, which is useful on dashboards. Do not use it to hide a mistake in the source data.
Usually because only some rows contain the trigger: The denominator cell is zero. The denominator cell is empty — Excel evaluates it as zero. A lookup returned #N/A or blank, which then became the denominator.
Shows a blank instead of #DIV/0! when the denominator is zero or empty. Use this pattern as a guard: =IF(B2=0,"",A2/B2)
Still stuck?
A human Excel expert can repair the formula, explain the cause and return a tested workbook — usually within 24 hours. Fixed quote before work starts, from $15/hr.