Excel #DIV/0! error

The formula divides by zero or by an empty cell.

Why it appears

How to fix it

  1. Anchor the divisor with $ if it is a total: =B2/$B$7.
  2. Show another value while there is no data: =IFERROR(B2/C2,0).
  3. Or check first: =IF(C2=0,"",B2/C2).

Gives the error

=B2/C2

Fixed

=IFERROR(B2/C2,0)

About Ads

This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.

Advertising
Loading ad...

Ads help us keep WebHerramientas free for everyone

Practice it

Solve the exercise on the sheet; it is checked instantly. See all lessons · Formula translator

IFERROR

IFERROR(formula, value) returns the formula’s result or, if it errors (#DIV/0!, #N/A…), the value you choose. Use it to keep your tables free of errors.

Example=IFERROR(B2/C2,0)SI.ERROR = IFERROR

In D2, divide revenue by units. When no units were sold, show 0 instead of the error.

D2
ABCDE
1ProductRevenueUnitsAverage price
2Coffee4,50030
3Tea00
4Chocolate2,40016
5Cookies9000
6Bread1,30026
7

Tip: while typing, click a cell or drag across several to insert their reference. F4 anchors the reference with $.

Frequently asked questions

What does #DIV/0! mean in Excel?
The formula divides by zero or by an empty cell.
How do I get rid of the #DIV/0! error?
Anchor the divisor with $ if it is a total: =B2/$B$7. Show another value while there is no data: =IFERROR(B2/C2,0). Or check first: =IF(C2=0,"",B2/C2).
What is #DIV/0! called in Spanish Excel?
Spanish Excel shows it as #¡DIV/0!.