Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jun 2011
    Posts
    188
    Thanks
    62
    Thanked 0 Times in 0 Posts

    each worksheets in a folder copy header and last row paste masterworkbook

    Hello Expert !
    I need your help... I have worbooks in folder each workbook contains three worksheets with same names in all. I want that the vba copy make three sheets in master workbook and all the data of sheet1 from source ( folder ) copy in sheet1 of masterworkbook, same for sheet2 of all workbook in a source ( folder) copy to masterworkbook in sheet2 and for sheet three do the same copy headers and till last rows?

    Thanks
    farkh
    Last edited by farrukh; 2013-11-01 at 09:28. Reason: do the same copy headers and till last rows?

  2. #2
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,830
    Thanks
    136
    Thanked 483 Times in 460 Posts
    Hi Farrukh

    ..did you want each of the corresponding sheets to be combined i.e. cell numbers added, or do you want the data in corresponding sheets appendedi.e. records appended beneath each other????

    ..what about a sample file??

    Also, have you checked previous posts for combining data from multiple workbooks??

    zeddy

  3. #3
    2 Star Lounger
    Join Date
    Jun 2011
    Posts
    188
    Thanks
    62
    Thanked 0 Times in 0 Posts
    Hello Respected,
    Thank you very much for reply...
    I want to append the data in master workbook beneath each other.

    I am attaching the Sampler test.xlsx and Master.xlsx . In the Master file the sheet names and the header static. The source files e.g are in the D:\Temp (Sampler test.xlsx ,Sampler test1.xlsx,Sampler test3.xlsx so on) Contain 100+ files . I want that routine check the master file sheet names and the headers then append the data to their respectives Sheets ( Get1,Get2,Get3).
    Attached Files Attached Files

  4. #4
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,830
    Thanks
    136
    Thanked 483 Times in 460 Posts
    Hi Farrukh

    ..I'll have a look at this later - I'm travelling shortly, back tomorrow.

    zeddy

  5. #5
    2 Star Lounger
    Join Date
    Jun 2011
    Posts
    188
    Thanks
    62
    Thanked 0 Times in 0 Posts
    Respected Zeddy no issue have a very safe Journey precious man... if possible will you share your picture want to see a kind man to humanity.
    Email=farrukhhameed786@gmail.com

  6. #6
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,830
    Thanks
    136
    Thanked 483 Times in 460 Posts
    Hi Farrukh

    I don't think it's a good idea to just create a macro that would merge the datafiles into a Master file.
    How would you know if all the datafiles were actually processed???
    How would you know if some of the datafiles were missing required sheets etc etc????

    I think the better solution would be to have a master file which..
    > allows you to select the source folder containing your datafiles
    > creates a list of the datafiles to be processed
    > allows you to delete any files you don't want to process (i.e. delete any rows containing the name of the unwanted files)
    > then allows you to process the list of files

    I have attached a master merge file which allows you to do this, together with 4 sample files in a zip file.
    (unzip the sample files to a test folder)

    In the merge process, I have included the headers from each file that is imported into the Master.
    This import process could be easily modified to exclude this.


    let me know if this does what you want.

    zeddy
    Attached Files Attached Files

  7. The Following User Says Thank You to zeddy For This Useful Post:

    farrukh (2013-12-07)

  8. #7
    2 Star Lounger
    Join Date
    Jun 2011
    Posts
    188
    Thanks
    62
    Thanked 0 Times in 0 Posts
    Respected Zeddy,

    Awesome ! Thanks you really i dont have words to say thanks...

    God Bless you always...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •