#Div/0! Error

  • Thread starter Thread starter J
  • Start date Start date
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.
 
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.
 
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)
 
Back
Top