+ Reply to Thread
Results 1 to 4 of 4

Merge multiple workbooks & move each merged worksheet into another folder

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Merge multiple workbooks & move each merged worksheet into another folder

    Hi Excel Experts,

    Am trying to code down macros that can do the following:-

    1. Copy sheet from multi workbooks (in same folder) into 1 main (Compiler) excel workbook (separated by tabs)
    2. Each time after the sheet is copied into Compiler workbook, the source file should be moved to another folder titled as "Done" in the same path.
    3. The multisheets' tabs in Compiler workbook should then be merged into 1 Master worksheet (Sheet1 in same Compiler workbook). Before merging, must check first if Master worksheet has been created or not. If yes, the data range to be added must continue from the last row of data in Master. Else, a new worksheet named "Master" must automatically be created and all data range will be added.
    4. After merged, all worksheets except Master and Sheet2 must be deleted.


    I've managed to do for step 1 and 4 while partly on step 3 and none for 2. Step 2 should be done while in loop of Step 1.

    My code below are for Step 1 and partly Step 3. I need help to modify my Step 1 coding to be able to do Step 1 & 2. Then to modify my Step 3 coding which mainly only able to merge all content of multiworksheets but cannot copy the first header as the main header in Master file. Apart from that, currently my coding cannot be able to check the existence of Master worksheet before proceed to merge and it will not auto create new worksheet as Master if found not exist.

    Appreciate so much of your help.

    STEP 1 (need to code to allow doing STEP 2)
    Please Login or Register  to view this content.
    Partly STEP 3 (need code to check existence of Master worksheet. If exist, continue from last row data. If not, create a new one).

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Merge multiple workbooks & move each merged worksheet into another folder

    Some kind of homework?

  3. #3
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: Merge multiple workbooks & move each merged worksheet into another folder

    Dear All,

    I managed to find a solution for this by modifying the code to work based on the worksheet index. Now, all done successfully.

    This considered solved.

    Thank you.

    DZ

  4. #4
    Forum Contributor
    Join Date
    10-18-2015
    Location
    manila, philippines
    MS-Off Ver
    MS Office 2010
    Posts
    186

    Re: Merge multiple workbooks & move each merged worksheet into another folder

    Can you share your codes for other's reference?

+ 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] Merge a range from all workbooks in a folder to one Master Sheet
    By ACALEX in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2014, 11:05 AM
  2. Copy Active Worksheet into Multiple Workbooks in Separate Folder
    By FinkKosek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2014, 04:37 PM
  3. Merge workbooks in a folder and rename sheets to previous filenames
    By zej in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2013, 10:19 AM
  4. Copy worksheet to multiple workbooks in a folder
    By MysticGenius in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2012, 07:10 AM
  5. [SOLVED] Delete A Worksheet From All Workbooks In A Folder
    By AlexRoberts in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-26-2011, 02:01 PM
  6. Copy worksheet to all workbooks in specified folder
    By nosstech in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-12-2009, 03:45 PM
  7. insert worksheet in all workbooks in folder
    By rajkumarshyam in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-03-2007, 08:39 PM

Tags for this Thread

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