# Getting #DIV/0! in Microsoft Excel spreadsheet

The **#DIV/0!** error is received when working with an Excel spreadsheet formula that is dividing two values in a formula, and the divisor (number being divided by) is 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 that have 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" similar to the example below.

=IF(A2="","",A2/A1)

In this above example if cell A2 is equal to "" (nothing) then print nothing. Otherwise, divide the cell values A2 with A1. The above example could also be modified to perform a different calculation instead of printing nothing by replacing the second "" with a formula or text.

#### Additional information

- Divide error.
- Getting #VALUE! in Microsoft Excel spreadsheet.
- See the divide and formula definition for further information and related links.
- Microsoft Excel help and support.