MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Eliminate #DIV/0 from formula


Posted by AL on December 30, 2001 1:19 PM

How do I eliminate #DIV/0 from formula below

=SUM((BR27)/(BR15+BR18))


Posted by Jacob on December 30, 2001 1:50 PM

Try this

=If (BR15+BR18=0,0,SUM((BR27)/(BR15+BR18)))

Jacob

Posted by AL on December 30, 2001 2:26 PM

Re: Jacob, I have another

Jacob

Here is another for you to solve. and thanks again

AL

'=SUM((BR28+BR29)*(BR13))/(BR21+BR22) =#DIV/0!

Posted by Dank on December 30, 2001 2:43 PM

Re: Jacob, I have another

Same sort of method. Use IF to see if the denominator (the number you're dividing by) equals 0. If it does then return 0, if not then return the formula i.e.

=IF(BR21+BR22=0,0,SUM((BR28+BR29)*(BR13))/(BR21+BR22))

Regards,
Daniel.

Posted by al on December 30, 2001 3:01 PM

Re: Thanks Daniel, I have it now.

Posted by Mark W. on December 30, 2001 3:47 PM

SUM isn't needed...use this instead...

=IF(MOD(BR15,BR18),BR27/(BR15+BR18),0)