Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Help and How-to
Search
Search
 
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Correct a #DIV/0! error
 

Occurs when a number is divided by zero (0).

  1. Click the cell that displays the error, click the button that appears  Button image, and then click Trace Error if it appears.
  2. Review the possible causes and solutions.

Possible causes and solutions

ShowEntering a formula that contains explicit division by zero (0)— for example, =5/0

Change the divisor to a number other than zero.

ShowUsing 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.

ShowRunning 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.

advertisement