What do you think will be the result for the following
- 4 divided by 2
- 90 divided by 9
- 44 divided by 0
If your division formula went oops (#DIV/0!) on the 3rd one then for handling situations like these you can use IFERROR Function in Excel. The error could be anything but IFERROR steps in with an alternative, in-case your formula returns an error
Here is how it works!
In the example below $30,000/3 will work fine but $40,000/0 will give an error because you can’t divide a number in excel by 0 (zero). Therefore a DIV error!
To cosmetically improve the result wrap the division in the IFERROR function.
IFERROR accepts two inputs
- Value – This could be a number, text or even a formula (in our case this is the division formula)
- Value if Error – What do you want in case the first part results in an error. Again this could a number, text or another formula too. In our case whenever there is a divide by zero then the output will be “Not Possible”.
Alternatively, we could have also placed a 0 (zero for the second part) of the IFERROR function
Related Articles : IF, NESTEDIF, AND & BOOLEAN Logic
If you have any questions please put them down in comments, I'll be glad to help