+ Reply to Thread
Results 1 to 10 of 10

generate report - consolidation macro

  1. #1
    Registered User
    Join Date
    06-03-2013
    Location
    brussels
    MS-Off Ver
    Excel 2007
    Posts
    94

    generate report - consolidation macro

    Dear,

    I would like to receive some help with following macro...
    I have a master report file : UAT_TEST_CASES_MASTER for which I want to generate a report based upon other input sheets (for example UAT_TEST_CASES_XXX, UAT_TEST_CASES_YYY, ...)

    the macro should:
    - be included into the master test cases
    - insert pop-up message which file to use as input to copy to master file
    - copy all lines looping all worksheets of the input file where the column test executor (column I) is completed with a value and pasting it to the same worktab (same name in master).
    - when running the macro for multiple users, the macro should not overwrite the lines but continue where the last line was injected.

    Objective: to make a consolidation of different input files into one master file.

    I hope this is more or less clear
    I attach in attachment both example files.

    Thanks in advance for your promt assistance!

    Erik
    Attached Files Attached Files
    Last edited by rickmeister; 11-27-2013 at 06:14 AM.

  2. #2
    Registered User
    Join Date
    06-03-2013
    Location
    brussels
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: generate report - consolidation macro

    I have made a first attempt, however the macro runs but without any result

    I would like to copy all not nulmll values that can be column I (looping all the sheets per input file) to the master sheet in the appropriate worktab


    Please Login or Register  to view this content.
    Last edited by rickmeister; 11-28-2013 at 05:46 AM.

  3. #3
    Registered User
    Join Date
    06-03-2013
    Location
    brussels
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: generate report - consolidation macro

    Please Login or Register  to view this content.
    the found rows should be copied to the appropriate sheet - currenlty nothing is copied.. How can I solve this?

  4. #4
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: generate report - consolidation macro

    Hi..

    This should do it..

    I didn't quite understand what the "ISU" value was meant to be.. so I assumed it was a Name abbreviation (of the Test Executor)...

    To test .. I have added a few rows of "AFA" as the executor in your test case workbook for each sheet.. so i autofiltered on Column 9 (not 10).. but this will be easy to change if my assumption is wrong..

    Click the button and type "AFA" .. no quotation marks.. into the input box..

    It will then loop through each sheet in your test case workbook.. autofilter for any rows that were tested by "AFA" and copy them to the relevant Sheet in your Master Workbook.

    I have added both files in a Zip file below..

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by apo; 11-29-2013 at 04:29 PM. Reason: Proper zip file added

  5. #5
    Registered User
    Join Date
    06-03-2013
    Location
    brussels
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: generate report - consolidation macro

    Hi Apo! Thanks for your feedback! I have run your macro on the master sheet in attachment using as input the file UAT TEST CASES EHE but I get the following error:

    Workbooks(wbname).Sheets(wbstr).Range("A15:M" & lr - 2).AutoFilter 9, ISU
    Run-time error 1004: application defined or object defined error

    Also when running your macro on the sheets you have provided I get the same error..
    Attached Files Attached Files
    Last edited by rickmeister; 11-29-2013 at 04:45 AM.

  6. #6
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: generate report - consolidation macro

    So did you try it with the test case file that was attached.. did that work for you as it did I?

    Also.. was i correct in thinking that the Test Executors Names (3 character abbreviation) is what is meant to be entered?

  7. #7
    Registered User
    Join Date
    06-03-2013
    Location
    brussels
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: generate report - consolidation macro

    Aha it worked, I 'll try to finetune it and see what it brings, keep you posted!
    Last edited by rickmeister; 11-29-2013 at 04:56 AM.

  8. #8
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: generate report - consolidation macro

    Hi..

    I think the issue is that.. with Test Case file you posted.. the first 2 sheets were bypassed as was the last.. I coded for that..

    BUT..

    The Test case you just sent me.. the first 4 sheets needed to be bypassed..

    So this..
    Please Login or Register  to view this content.
    needed to be changed to this:
    Please Login or Register  to view this content.
    Probably a good idea if you have all your test case sheets have the same sheet structure..

    I just tested the Test case with that change and it worked fine.. lemme knwo how you go..

  9. #9
    Registered User
    Join Date
    06-03-2013
    Location
    brussels
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: generate report - consolidation macro

    Indeed, I found it also out!
    working well now! super!! thanks a lot!!!!
    Last edited by rickmeister; 11-29-2013 at 12:16 PM.

  10. #10
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: generate report - consolidation macro

    Hi.. thats great..

    btw.. I replaced the zip file in Post #4.. there were 4 extra non related files in it.. no idea how they got there.. I blame the beer..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] generate report macro - complex
    By rickmeister in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-28-2013, 07:31 AM
  2. Generate Report - Macro
    By mokztan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-09-2013, 03:00 AM
  3. Macro to generate report
    By Dr.SUN in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-23-2012, 05:38 AM
  4. Generate Report using Macro
    By Kohinoor in forum Excel General
    Replies: 1
    Last Post: 03-21-2009, 04:39 AM
  5. Can a Macro generate a report?
    By Fowley in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2008, 08:40 PM

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