The #DIV/0! error occurs when working in an Excel spreadsheet with a formula that is attempting to divide by zero. You’ll get the formula result of #DIV/0! that indicates a divide by zero error. To resolve this issue, try the following recommended steps.
Do not divide by zero or non-values
The obvious solution to this issue is of course to divide only with cells with a value not equal to zero.
Use an if formula
A more elegant solution to this problem, especially when dealing with a spreadsheet that needs empty cells is to use an “if formula” like the example below.
=IF(A2="","",A2/A1)
In the example above, if cell A2 is equal to "" (nothing) then print nothing. Otherwise, divide the cell values A2 with A1. This example could also be modified to perform a different calculation instead of printing nothing by replacing the second "" with a formula or text.
Related information
- How to fix a divide or divide by zero error.
- Getting #VALUE! in Microsoft Excel spreadsheet.
- Why Excel shows ##### in a spreadsheet cell.
- See the divide and formula definition for further information and related links.
- Microsoft Excel help and support.