+ Reply to Thread
Results 1 to 3 of 3

Merging multiple closed worksheets into a master file

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    Los Angelos, California
    MS-Off Ver
    Excel 2010
    Posts
    3

    Merging multiple closed worksheets into a master file

    I need to merge sheet 1 on 14 closed excel workbooks that will be updated on a daily basis with new information. I tried using the RDB merge add-in, and it works pretty well. However, each sheet has the same column headers and the add-in brings the same header for each file. The add-in also brings in all of the empty spaces at the bottom of the sheet - which makes the sheet inconvenient to use.

    I have a VBA module that I altered from this thread: http://www.excelforum.com/excel-prog...-new-post.html
    I'm getting a "run time error 9, subscript out of range" and the code is not drawing the data into the master workbook. The debugger highlights the line "Set sourceData = sourceBook.Worksheets ("MASTER").

    I will upload the master file and two examples. I hope that someone on here can give me some help with the macro. Thank you.MasterTrack1.xlsmAWhiteTracking.xlsBLoweryTracking.xls

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Merging multiple closed worksheets into a master file

    Change the name from Master to whatever is the sheet name in your source file. So if your source files have the same name and if it is Sheet1 for example, you change the line to
    Please Login or Register  to view this content.
    However, if the sheet name is not the same in all the workbooks but it is the 1st sheet or the 2nd sheet in all the workbooks, then you can change the line to
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    01-30-2013
    Location
    Los Angelos, California
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Merging multiple closed worksheets into a master file

    Thank you! This is pulling correctly now. I just have one other question. I need to run this macro multiple times a week so I can have up to date information. Is there anyway to add a line into the macro so it doesn't copy lines that have already been merged into the master file? Or will I have to have a blank master file every time I run this? Please let me know if something like that is possible. I will mark this thread as solved in the once you get back to me. you have been extremely helpful already. Thank you.

+ 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