A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#Div/0! Error



 
 
Thread Tools Display Modes
  #1  
Old March 28th, 2006, 03:53 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default #Div/0! Error

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.

  #2  
Old March 28th, 2006, 04:10 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default #Div/0! Error


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.
--
SA
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

"J" wrote in message
oups.com...
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.



  #3  
Old March 28th, 2006, 04:12 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default #Div/0! Error

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)

--
Duane Hookom
MS Access MVP
--

"J" wrote in message
oups.com...
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.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you create customised error messages in Access? Randall General Discussion 2 February 24th, 2006 06:32 PM
Can I prevent a #DIV/0! error from plotting on a chart curious Charts and Charting 1 August 26th, 2005 08:35 AM
Help! I'm getting error messages too much-can't open Resume Wizard LizLB General Discussion 0 May 3rd, 2005 01:46 AM
Help, i'm gettiing error: Access has encountered a problem and needs to close... betsy General Discussion 0 September 14th, 2004 08:20 PM
Productkey problem when installing office 2003 on network Stefan Schreurs Setup, Installing & Configuration 1 June 1st, 2004 11:16 PM


All times are GMT +1. The time now is 02:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.