#Div/0! Error

J

J

I have the formula:

=(Sum([Estimated Budget (Mat'l)]+[Estimated Budget (Trans)]+[Estimated
Budget (Labour)]))/(Sum([Completion Status]))/100

and when I run the report I get "#Div/0!" appearing where I placed the
formula. When i run the report for a different number then the formula
works. If it makes any difference, the numbers being entered are in
the format of B01, B02, etc. Any help would be appreciated.
 
S

SA

Change the formula to look like this, because if Sum([Completion Status]) =
0 for any project, the divide by zero error will occur:

=IIF((Sum([Completion Status]) = 0 or IsNull(Sum([Completion Status])), _
0, Sum([Estimated Budget (Mat'l)]+[Estimated Budget (Trans)]+ _
[Estimated Budget (Labour)]))/(Sum([Completion Status]))/100)

( an _ means the line continues)

This will check the value of the completion status before doing the divide.
 
D

Duane Hookom

How would you enter numbers "in the format of B01, B02, etc"?
I expect you have some Completion Status values of 0. Try something like:
=IIf(Sum([Completion Status])=0,0, (Sum([Estimated Budget
(Mat'l)]+[Estimated Budget (Trans)]+[Estimated Budget
(Labour)]))/(Sum([Completion Status]))/100)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top