Occurs when a number is divided by zero (0).
- Click the cell that displays the error, click the button that appears
, and then click Trace Error if it appears.
- Review the possible causes and solutions.
Possible causes and solutions
Entering a formula that contains explicit division by zero (0)— for example, =5/0
Change the divisor to a number other than zero.
Using the cell reference to a blank cell or to a cell that contains zero as a divisor
Note If the operand (operand: Items on either side of an operator in a formula. In Excel, operands can be values, cell references, names, labels, and functions.) is a cell that is blank, Microsoft Excel interprets the blank as zero.
- Change the cell reference to another cell.
- Enter a value other than zero in the cell used as a divisor.
- Enter the value #N/A into the cell referenced as the divisor, which will change the result of the formula to #N/A from #DIV/0! to denote that the divisor value is not available.
- Prevent the error value from displaying, using the IF worksheet function. For example, if the formula that creates the error is =A5/B5, use =IF(B5=0,"",A5/B5) instead. The two quotation marks represent an empty text string.
Running a macro that uses a function or a formula that returns #DIV/0!
Make sure the divisor in the function or formula is not zero or blank.