Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2004

Tip: Looking for answers? Try searching our database.

Update DCount Criteria

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob - 06 Apr 2004 21:45 GMT
I have an excel database with over 4,000 records. Each month, I have
to run 100 reports based on this data. Currently, I am using multiple
DCount Formula to filter the data. My problem is I to manulaly update
one of the Dcount Criteria fields before I print the report.

Specifially, I enter 1 in the first cell within the DCount Criteia. I
than print a report based on this data. I then enter 2 in the frist
cell and print a report. I do this for over 100 reports. Is there a
way to automate this process?

Thanks in advance.
Dave Peterson - 06 Apr 2004 23:27 GMT
How about recording a macro when you do it once to get the range addresses
straight.

Maybe something like this:

Option Explicit
Sub testme01()

   Dim iCtr As Long
   For iCtr = 1 To 3  '100
       Worksheets("sheet1").Range("b2").Value = iCtr
       Application.Calculate
       Worksheets("sheet1").PrintOut preview:=True
   Next iCtr
   
End Sub

I left it as print preview and for 1 to 3--didn't want to kill too many trees
while testing.

> I have an excel database with over 4,000 records. Each month, I have
> to run 100 reports based on this data. Currently, I am using multiple
[quoted text clipped - 7 lines]
>
> Thanks in advance.

Signature

Dave Peterson
ec35720@msn.com

Bob - 07 Apr 2004 04:56 GMT
Thanks. It worked perfectly.

> How about recording a macro when you do it once to get the range addresses
> straight.
[quoted text clipped - 27 lines]
> >
> > Thanks in advance.
Dave Hawley - 07 Apr 2004 04:23 GMT
Hi Bob

If you go here:
http://www.ozgrid.com/download/default.htm

and download "DFunctionsWithValidation.zip" it may help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.