How to avoid #Div/0 in Microsoft Excel

In this tutorial we will learn how to avoid #Div/0 in Microsoft Excel.To avoid this error, you can use an IFERROR function to handle the error and display a custom message or a blank cell instead. The IFERROR returns a custom message if an error occurs.The syntax for the IFERROR is 

                   IFERROR(value,value_if_error)

Currently we have a data set showing the average selling price ( Total Revenue / Units Sold). We have encountered #Div/0 error. We aim to avoid the error using the IFERROR function.

The “Div/0” error in Excel appears when you try to divide a number by zero (0) or an empty cell. The error message “#DIV/0!” is displayed in the cell where the error occurs, indicating that the calculation cannot be performed due to an invalid formula. It is important to note that dividing by zero is not a valid mathematical operation, and Excel treats it as an error. If you attempt to divide a number by zero, Excel will return the “#DIV/0!” error message to indicate that the calculation is invalid.

Step 1 – Double Click on the Cell

– Double click on the cell showing error to edit.

Step 2 – Add the IFERROR Function

– Add the IFERROR in the cell.
– The syntax of the IFERROR function here will be:
                               IFERROR(C2/B2,”0”)
– Where the first argument i.e. C2/B2 is the value we want to obtain.
– The second argument i.e. “0” is the custom value the function will return if an error is encountered.

Step 3 – Press the Enter Key

– Press the Enter key to get the results.
– The #Div/0 error will be removed and the custom statement or value will be displayed.

Step 4 – Apply the IFERROR Function on Each Row

– Apply the IFERROR function on each row using the autofill feature so that the error encountered is avoided.