+ Reply to Thread
Results 1 to 7 of 7

Merging Data from Worksheet from Multiple Workbooks

  1. #1
    Registered User
    Join Date
    04-14-2013
    Location
    Alberta
    MS-Off Ver
    Excel 2007, Excel for Mac
    Posts
    5

    Merging Data from Worksheet from Multiple Workbooks

    Hi guys,

    Im new to the Macro part of excel. Im trying to figure a way out to make a serial number summary worksheet from 3000 plus files/workbooks. I found RDB merge add-in, it is close to what im looking for but dont want it to add blank lines (no data entered) and to also add invoice number and date from worksheet as well for every item on that report? So i can have a inspection data sheet for every serial number and corresponding data (range) in one file as a serial number history. If this makes sense?

    Trent

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Merging Data from Worksheet from Multiple Workbooks

    You need to add a bit more information and uploading a sample file is a good way to start.

    You should also say what information you wish to extract and how you wish it organized. Are all the files of the same layout? Does each file contain several sheets or do you only wish to extract information from one sheet?

    to make a serial number summary worksheet from 3000 plus files/workbooks
    Are you talking about creating a "target" file with 3000 sheets in or?

    Alf

  3. #3
    Registered User
    Join Date
    04-14-2013
    Location
    Alberta
    MS-Off Ver
    Excel 2007, Excel for Mac
    Posts
    5

    Re: Merging Data from Worksheet from Multiple Workbooks

    k thanx will try and make a sample sheet. Im new to this forum as of today lol. Yes all the files are the same layout and some files have more then one sheet (with the same layout and name jsut (2), (3), etc) to extract data from. Creating one file. But gotta extract data from all excel files in folder and all subfolders in a certain range and create a single worksheet with all data.

    Going to play around with RDB Merge, website and see if i cant get the basic of the merge to work then try and fine tune it.

    Trent

  4. #4
    Registered User
    Join Date
    04-14-2013
    Location
    Alberta
    MS-Off Ver
    Excel 2007, Excel for Mac
    Posts
    5

    Re: Merging Data from Worksheet from Multiple Workbooks

    Would like to merge all files with this worksheet "Inspection Report" in it the Range B12:W31 would be what needs to be merged into one sheet from multiple files.
    Attached Files Attached Files

  5. #5
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Merging Data from Worksheet from Multiple Workbooks

    Perhaps this could be a starting point?

    Change folder to suit your needs but this macro will not loop through subfolders.

    When pasting to target workbook the "PasteSpecial" command is set to paste all i.e. formats, values and formulas.

    If pasting formulas is a problem replace "Paste:=xlPasteAll" with "Paste:=xlPasteValues"
    and add an extra line in the "PasteSpecial" command to paste formats if you wish to include this as well.

    Please Login or Register  to view this content.
    Alf

  6. #6
    Registered User
    Join Date
    04-14-2013
    Location
    Alberta
    MS-Off Ver
    Excel 2007, Excel for Mac
    Posts
    5

    Re: Merging Data from Worksheet from Multiple Workbooks

    Played around with this and got it working but need to add subfolders. But it takes a long time cause it opens the file and then compies data (ADO) is supposed to be faster will pull from closed files? Not sure how to do that. And also how do you enter code so if row in that range has no data entered it will not copy a blank spot into summary sheet.
    Attached Files Attached Files

  7. #7
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Merging Data from Worksheet from Multiple Workbooks

    takes a long time cause it opens the file and then compies data (ADO) is supposed to be faster will pull from closed files
    That depends on the amount of data you wish to extract, for small amounts yes but I don't know how small a small amount is.

    This is a Microsoft link explaining the workings of ADO http://support.microsoft.com/kb/257819

    do you enter code so if row in that range has no data entered it will not copy a blank spot into summary sheet
    After all files being imported I would probably set up an "Auto filter" for the imported range filter for blank rows and the delete them. That is assuming that range B12 to B31 contains some blank rows. If all rows are blank then it won't matter.

    Alf

    Ps Checking your code I see the work of Ron de Bruin so I’ll leave you in his capable hands. He is a much better guide then I’m on the winding path of VBA
    Last edited by Alf; 04-15-2013 at 11:10 AM.

+ 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