+ Reply to Thread
Results 1 to 4 of 4

VBA to generate a report from Excel, two conditions

  1. #1
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    VBA to generate a report from Excel, two conditions

    Hi there,

    I have a really simple spreadsheet and what I would like to do is.....you specify a condition and hit a button, and excel generates a report showing how many records meeting the criteria in a given period in a different worksheet.

    Please see the attached for a sample description.

    In worksheet "Data entry", records are entered here. Reporting period is a drop down. In the "report" worksheet, this is where I would like to show the summary-level report.

    For example, a standardized report we would like to see is...... show how many records have target of "Yes" in a specific reporting period. I think I will use a filter(filter on which reporting period) and a button to do the job. The extracted record needs to be in the "report" worksheet with column headings specified.

    How should I go about implementing this using VBA?

    Thank you for taking the time to help
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: VBA to generate a report from Excel, two conditions

    No VBA is necessary.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: VBA to generate a report from Excel, two conditions

    Hi,

    Thanks. If I wanted to do quarterly reporting and yet still have Excel show a break-down by periods within each quarter, will this method work? I tried it out by adding another reporting period column in there, but it's still showing me only one line for each of the quarter.

    I would like to see the actual break-down by periods for each report quarter selected. So each quarter would have 3 lines as shown on the data entry form.

    Please see the attached for illustration.

    Thank you
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: VBA to generate a report from Excel, two conditions

    Hi,

    Could someone please help? I have this pivot table set up, but the format is not desired. Please see the attached.

    Eventually, I would like to have the final report show in the following manner:

    Reporting Quarter Reporting Period Site CCM Target Total encounters

    where "total encounters" is the total number of encounters within a given quarter, and CCM target is set to "Yes".

    Is it possible to add to the pivot table fields with condition? Right now, pivot table columns B,C D and E all show the same value. However, CCM target column needs to show only the records with "Yes" value in a reporting quarter and total encounter is the total number of encounters, which include the "Yes" and "No" in a given reporting quarter.

    Is this possible with pivot table?

    Thank you
    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