+ Reply to Thread
Results 1 to 10 of 10

Combine multiple sheets from multiple books into one

  1. #1
    Registered User
    Join Date
    08-20-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    45

    Combine multiple sheets from multiple books into one

    Hi all,

    What I am trying to do it quite simple (I hope!)

    I have 6 spreadsheets all within the same folder, these are pretty much identical (rows, colums, sheets within them) apart from the names of the files.

    I then have a master spreadsheet within the same folder where I want to combine all the data, from all the sheets within each book (if that makes sense!) apart from the data on the last sheet within each book as this is the reference data, onto one sheet within this master file. If possible I only want to copy rows accross which have complete data too.

    So: (names not correct)
    From book1.xls copy all data on sheets (sheet1, sheet2 etc) except last sheet
    From book2.xls copy all data on sheets (sheet1, sheet2 etc) except last sheet
    combine onto masterfile.xls on sheet1.

    I have searched on here and can only find how to do it with the first sheet in each workbook, not looping through all the sheets in each book. Please see below.

    Many thanks in advance.

    Please Login or Register  to view this content.
    Last edited by jasocke2; 08-25-2009 at 06:32 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Combine multiple sheets from multiple books into one

    Hi

    How about

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    08-20-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Combine multiple sheets from multiple books into one

    Hi,

    Thanks for the code, works great thanks, much appreciated.

    Just one last question. Is there anyway of copying all the data across but without the headers?

    The headers are on A2 to F2 on every sheet.

    Thanks again.

    James

  4. #4
    Registered User
    Join Date
    08-20-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Combine multiple sheets from multiple books into one

    After looking through the results it also seems to be missing of the first sheet on the first workbook it looks at but yet copying the rest of the data fine?

    Thanks

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Combine multiple sheets from multiple books into one

    Hi

    How about setting up 3 or 4 example files which replicate your problems. Much easier to see what is happening.

    rylo

  6. #6
    Registered User
    Join Date
    08-20-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Combine multiple sheets from multiple books into one

    Hi.

    I have attached some sample files. The file master is the one with code in, the path will just need changing to suit.
    The headers no longer appear so that is sorted, the problem is just the first sheet of the first file that doesn't transfer across to the 'master' file, as seen in the example.

    Many thanks,
    Attached Files Attached Files

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Combine multiple sheets from multiple books into one

    I think this does what you want

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  8. #8
    Registered User
    Join Date
    08-20-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Combine multiple sheets from multiple books into one

    Cheers that's great. Seems to have done the trick.

    Strange how on the first workbook though it copies the sheets back to front, (i.e copies sheet 2 before it copies sheet 1!).. not a problem though.

    Thanks for all your help.

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Combine multiple sheets from multiple books into one

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  10. #10
    Registered User
    Join Date
    03-18-2010
    Location
    MEXICO
    MS-Off Ver
    Excel 2007
    Posts
    1

    Talking Combine multiple sheets from samee book into one sheet

    Hello everybody, I hope some body can help me with this, I have many sheets which I want to combine or have all together in one.

    Cheers

    Ulises A.

+ 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