+ Reply to Thread
Results 1 to 17 of 17

Generate weekly Report

  1. #1
    Registered User
    Join Date
    09-06-2010
    Location
    Bristol
    MS-Off Ver
    Excel 2003
    Posts
    96

    Generate weekly Report

    Hi Guys

    Please find attached the workbook "cheque". Currently it displays all the information for the date we select in sheet2 but what I want is when the user selects the week ending date then the report from Monday to Friday for the whole week should be printed off as attached example1 workbook.

    Can anyone please solve my problem.

    Thanks in advance for any help!!!
    Last edited by Nancy123; 09-27-2010 at 11:09 AM.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Generate weekly Report

    I started with an alternative for the report code:

    Please Login or Register  to view this content.
    Last edited by snb; 09-22-2010 at 06:09 AM.



  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Generate weekly Report

    After having done that it was relatively easy to implement your new criterion.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Generate weekly Report

    Wouldn't it be simpler to use a cell with validationlist to select a valid date ?
    See the implementation in the attachment.
    Attached Files Attached Files

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Generate weekly Report

    Hello Nancy123,

    After looking at this problem, the big coding issue I found was with the formatting the date. While the approach I took is a bit more complex, it provides a greater deal of flexibility and ease of coding. The code creates new VBA object that tracks the amount and cheque count for each day of the week. The count tracking is done automatically within the object. The object also outputs the total amounts and total counts as 1-D arrays. You also have the option of returning the total sum or total count for all seven days. The macros below have been added to the attached workbook.

    New VBA Object - clsDailySums
    Please Login or Register  to view this content.

    Weekly Report
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  6. #6
    Registered User
    Join Date
    09-06-2010
    Location
    Bristol
    MS-Off Ver
    Excel 2003
    Posts
    96

    Re: Generate weekly Report

    Hi Leith

    Thanks for your reply.As now the requirements have been changed so I am using Access database as a backend . Could you please tell me how to do the same thing using Excel as a frontend and Access as a backend.

    Thanks

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Generate weekly Report

    NB. Aman1234 is the same person as Nancy 123 and asks the same questions using different aliases (maybe more aliases ?)

  8. #8
    Registered User
    Join Date
    09-06-2010
    Location
    Bristol
    MS-Off Ver
    Excel 2003
    Posts
    96

    Re: Generate weekly Report

    Hi snb, Aman1234 is a different user but she is my colleague and so we are getting same problem.

    Thanks

  9. #9
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Generate weekly Report

    Your current answer is incongruent with your answer in the other thread:

    Thank you so much for your reply.My old thread "Generate weekly report" was related to the application developed all in excel and then I changed the backing database to Access . Now in this thread I want to pull infromation from Access database and print out a report. Could you please guide me how to do this.

  10. #10
    Registered User
    Join Date
    09-06-2010
    Location
    Bristol
    MS-Off Ver
    Excel 2003
    Posts
    96

    Re: Generate weekly Report

    Anyway I am here for getting help from the expreienced Excel guys and I don't have any need to make any aliases.

    I hope anyone can help me out of this problem.
    Last edited by Nancy123; 09-27-2010 at 11:45 AM.

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Generate weekly Report

    If it's the same problem then don't duplicate tthe question, people will have the same opinion as snb & ignore them

    Also, why rely on VBA all the time, a PivotTable would be a better way to produce reports
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  12. #12
    Registered User
    Join Date
    09-06-2010
    Location
    Bristol
    MS-Off Ver
    Excel 2003
    Posts
    96

    Re: Generate weekly Report

    Actually Roy, I never used Pivot tables so don't know exactly how to start. Leith gave me the full solution to the problem and its working perfectly fine but now I changed the backing database to Access so don't know how to pull weekly information from Access database and print it out.

    Thanks
    Last edited by Nancy123; 09-27-2010 at 05:36 AM.

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Generate weekly Report

    I think anyone that can make that statement about PivotTables & works with data should be embarassed. I also strongly believe that before using VBA all inbuilt functions such be investigated first

  14. #14
    Registered User
    Join Date
    09-06-2010
    Location
    Bristol
    MS-Off Ver
    Excel 2003
    Posts
    96

    Re: Generate weekly Report

    Hi guys

    I am writing the following code to display each day's details from the start date to end date. Although the format is not exactly same what I mentioned earlier , still the following code doesn't give me the complete result.I am adding one day in the start date each time the loop is started and I think that is not properly working. But I hope you Forum Gurus can help me out of this.
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    09-06-2010
    Location
    Bristol
    MS-Off Ver
    Excel 2003
    Posts
    96

    Re: Generate weekly Report

    Can anyone please solve my problem???

  16. #16
    Registered User
    Join Date
    09-06-2010
    Location
    Bristol
    MS-Off Ver
    Excel 2003
    Posts
    96

    Re: Generate weekly Report

    Any suggestions anyone please????

  17. #17
    Registered User
    Join Date
    09-06-2010
    Location
    Bristol
    MS-Off Ver
    Excel 2003
    Posts
    96

    Re: Generate weekly Report

    Hi Folks

    The following code is giving me the result from start date to End date.But I want a different format. The result that gets displayed is in sheet1 of the attached workbook but I want the format as shown in Sheet2.
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1