+ Reply to Thread
Results 1 to 11 of 11

vba to copy from multiple workbooks to a summary sheet in another workbook.

  1. #1
    Registered User
    Join Date
    11-21-2012
    Location
    Portland, or
    MS-Off Ver
    Excel 2007
    Posts
    6

    vba to copy from multiple workbooks to a summary sheet in another workbook.

    I am trying to figure out how to copy the audit results from 200+ workbooks in to a summary worksheet in another workbook. The audit results are based on the number correct and number that are incorrect. These results are always located on L98:L99 in each of the 200+ workbooks. The summary sheet is alphabetical based on each auditor and the groups they work on. I want the user to be able to enter the group name and the quarter from the audit results workbooks.

    Based on the user input, I want the code to copy the audit results and then search the summary worksheet to find the correct group and the correct quarter and paste the audit results to the corresponding specific cells.

    MS Off Ver: 2013
    Thanks for you help!

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: vba to copy from multiple workbooks to a summary sheet in another workbook.

    Could you supply us with some sample workbooks? It would be great to get 2 or 3 audit workbooks along with your Summary workbook.
    Are the 200+ files located in the same folder? How are they named?
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    11-21-2012
    Location
    Portland, or
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: vba to copy from multiple workbooks to a summary sheet in another workbook.

    I uploaded 4 files. The summary sheet repeats the group names for ease of editing but in the actual summary sheet each group name is unique. The files are all located in the same folder.
    The 200 + files are named by the unique group name and the quarter for which the responses are in.

    Thanks for your help!
    Lisa
    Last edited by lisadykstra; 07-18-2014 at 10:25 AM.

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: vba to copy from multiple workbooks to a summary sheet in another workbook.

    I'll take a look at this later on today but can you tell me if there is a standard naming procedure for the audit files. From the sample you supplied, It does not seem as you do. We will have to search for the auditor name along with the quarter the audit was done and it would be a good thing if the name of the file could give us those information always at the same place and with the same format. Is this possible?

  5. #5
    Registered User
    Join Date
    11-21-2012
    Location
    Portland, or
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: vba to copy from multiple workbooks to a summary sheet in another workbook.

    Each auditor audits the same groups all the time. The naming convention for the audit files does not include the auditor's name. It does includes the group name and quarter. It is possible to always save the file with the group name and the quarter in the same format.

  6. #6
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: vba to copy from multiple workbooks to a summary sheet in another workbook.

    I think I can see that quarters will be Q1, Q2, Q3 and Q4. Right?
    What about the groups? How many characters? Can you place the group characters always the first ? ones of the file's name?
    Will there be only audit files in this folder? If not, we need a way for the macro to distinguish the audit files from the other ones. Something like the word AUDIT in those files' name and this term will be prohibited in any other file's name.

  7. #7
    Registered User
    Join Date
    11-21-2012
    Location
    Portland, or
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: vba to copy from multiple workbooks to a summary sheet in another workbook.

    Correct. The quarters will be the Q1, Q2 and so forth. The group name will vary in length depending on the actual group name. We can place the group characters first and then the quarter. That is the normal naming convention. The only files in the folder would be the summary sheet and the audit files.

  8. #8
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: vba to copy from multiple workbooks to a summary sheet in another workbook.

    I don't understand how those 200+ files are related to a specific auditor like I see in your Summary sheet. May be this is only in the Summary sheet.

    Would it be possible to give me a Summary sheet that would be more realistic (like no replicate in group, etc.) and 3 audit files that I can work with (Files with proper names "group Q?.xls")?
    It think it should be obvious where each numbers go where?

    About your 200+ audit files, are they from different year? Do the macro have to fill in data for every quarter or just a specific one?

    Lots of questions just to get started but after that is cleared, it should be easy.

  9. #9
    Registered User
    Join Date
    11-21-2012
    Location
    Portland, or
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: vba to copy from multiple workbooks to a summary sheet in another workbook.

    Okay. I changed the names to protect the innocent : ) but I think this will help.

    The 200+ audit files are for each quarter. For example we audit A Group, B Group, C Group and so on every quarter in 2014. We will then audit those same groups in 2015. A seperate folder would be created for 2015. Each quarter we would update the summary sheets once the results come in for each group. So A Group, B Group, C Group, would all populate Q2 right now. In September those same groups would populate Q3. The macro would need to know which quarter so it could populate the correct cells on the summary sheet. Let me know if that makes sense?
    Thanks
    Attached Files Attached Files
    Last edited by lisadykstra; 07-18-2014 at 10:25 AM.

  10. #10
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: vba to copy from multiple workbooks to a summary sheet in another workbook.

    Hi Lisa,
    lets try the attached workbook and tell me if it words like you'd like it to.
    You have to run the macro named Get_Responses.

    I found that your B group workbook that you supplied has the result we are looking for at L96 and L97 instead of L98 and L99. You should take great care to have all the sheets exactly the same or the results will not come out.

    If you fear that this could be the case, we could search for the results by its tag in K98 and K99. In this case, the actual tags (met and not met) are probably not unique enough for this task. We'd have to come up with something more specific that we are pretty sure not to find in other cells.
    Regards
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    11-21-2012
    Location
    Portland, or
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: vba to copy from multiple workbooks to a summary sheet in another workbook.

    I havent had a chance to look at this yet. We had some "issues" come up that took priority. I hope to review it tomorrow morning. Thanks for all of your help!

    Lisa

+ 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. Copy data from multiple sheet in multiple books into a new summary workbook
    By dobba in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2014, 08:14 AM
  2. Replies: 0
    Last Post: 07-29-2013, 03:00 AM
  3. Copy multiple workbooks/worksheets into one summary workbook
    By CC2013 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2013, 05:58 AM
  4. Produce summary workbook sheet with data from multiple workbooks
    By Seancsn in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-27-2013, 01:04 PM
  5. [SOLVED] Macro To Copy Specific cells From Multiple Workbooks to New Summary Workbook
    By Mooseman60 in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 06-19-2012, 07:38 AM

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