Divide By Zero Error

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Don't divide by 0.

But seriously folks, why do you have 0's in your denominator? Can you fix this or do you just want to suppress the error? To suppress the error, you could do something like: =IF(B1,A1/B1,0)
 
Upvote 0
So if AR18 or AR22 is 0, use the BN cells, otherwise use the AR cells. Therefore, the DIV by 0 is because BN22 is 0. What do you want to have happen if BN22 is 0 while one of the 2 AR cells is also 0?
 
Upvote 0
Then try this:

IF(OR(AR18=0,$AR22=0),IF($BN22,($BN18)/($BN22)*$CF22,0),(AR18/$AR22)*$CF22)

or a little cleaner, pull the CF22 outside the IF

IF(OR(AR18=0,$AR22=0),IF($BN22,($BN18)/($BN22),0),(AR18/$AR22))*$CF22
 
Upvote 0
I have the following formula which I am using and divide by zero errors are occuring - does anyone know how I can amend this to show value 0?

=IF(AND($D$8=0,$P$8=0),BV$8*($P$7+$AF$7)/($P$8+$AF$8),IF(AR$7=0,BV$8*($AT$7+$BJ$7)/($AT$8+$BJ$8),BV$8*($AT$7/$AT$8)))

Thanks
 
Upvote 0
I've found a fairly easy way to get rid of div/0 errors is to do something like:

if(isnumber(*Enter Your Formula Here*), *Copy/Paste that same formula here*, 0)
 
Upvote 0
Everyone has their own individual method - they all tend to be if something then else 0 - Anyone know of anything other than an if formula?

for info the one i use is:

IF(ISERR(A1/A2),0,(A1/A2))
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,816
Members
449,049
Latest member
cybersurfer5000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top