+ Reply to Thread
Results 1 to 9 of 9

VBA--Help! Combining several work sheets into one

  1. #1
    Registered User
    Join Date
    09-19-2014
    Location
    richmond,canada
    MS-Off Ver
    2010
    Posts
    6

    Exclamation VBA--Help! Combining several work sheets into one

    I have about 100 worksheets and I want to combine them into one. All the first rows should be together and so as all the second rows etc.
    For example,

    sheet1
    a a a
    b b b
    c c c

    sheet2
    aa aa aa
    bb bb bb
    cc cc cc

    The result is:

    sheet3
    a a a
    aa aa aa
    b b b
    bb bb bb
    c c c
    cc cc cc

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA--Help! Combining several work sheets into one

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-19-2014
    Location
    richmond,canada
    MS-Off Ver
    2010
    Posts
    6

    Re: VBA--Help! Combining several work sheets into one

    Hi John,

    Thanks a lot for your help, but when I run the code, it always skip the first row of every sheet, can you modify it for me?
    In addition, my first active worksheet is not always called "Sheet1", can you make it work for any name of the first active worksheet?

    Thanks a lot!

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA--Help! Combining several work sheets into one

    Sure. What will be the actual name of the destination Sheet?

  5. #5
    Registered User
    Join Date
    09-19-2014
    Location
    richmond,canada
    MS-Off Ver
    2010
    Posts
    6

    Re: VBA--Help! Combining several work sheets into one

    Hi John,

    I have more than 100 sheets and I want the code to work for any situation, so the name of the first and destination sheet can be various

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA--Help! Combining several work sheets into one

    How would you know which sheet to copy the data to? Do you want it to be created automatically with the code? You'd have to know that or else it would be excluded when the macro copies the data and you could wind up with duplicate rows.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA--Help! Combining several work sheets into one

    This version will allow you to designate a Sheet.

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    09-19-2014
    Location
    richmond,canada
    MS-Off Ver
    2010
    Posts
    6

    Re: VBA--Help! Combining several work sheets into one

    Hi John,

    That works perfectly, Thanks again for you help!

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA--Help! Combining several work sheets into one

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ 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. Create PDF files from multiple work sheets in a single work book
    By erprasannaa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-29-2012, 03:42 AM
  2. Extract data into a master work book by accessing various input work sheets/workbooks
    By kammariarun in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-08-2011, 05:10 PM
  3. Macro Combining Work Sheets Into One
    By gaspower in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-14-2008, 05:21 PM
  4. Copy rows from work sheets to combine to one work sheet based on cell value
    By joemcmillen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2008, 05:04 PM
  5. Combining Work Sheets/MS Query
    By Mark McWilliams in forum Excel General
    Replies: 1
    Last Post: 06-16-2005, 10:05 PM

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