+ Reply to Thread
Results 1 to 5 of 5

Need Macro to combine multiple worksheets into one

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    7

    Need Macro to combine multiple worksheets into one

    Hi all,

    I have a workbook with about 30 worksheets, each with the same column headings but with a different amount of rows every month. Every month i have to consolidate each worksheet into one 'summary' worksheet (which is essentially me just copy/pasting all the rows in each worksheet under one another, without the headings)

    I managed to find some VBA code online which combine all the worksheets into one, although i have a number of worksheets in my workbook which i need to exclude from the macro. I also only need the headings once at the top.

    I've attached a sample workbook - so for example i need each of the worksheets combined into the 'Summary' worksheet, while excluding the tabs i don't want.

    Any help is greatly appreciated!!

    Thanks!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Need Macro to combine multiple worksheets into one

    It wasn't clear what the limiting factor for the excluded tabs was so I just based it precisely on your example workbook:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,442

    Re: Need Macro to combine multiple worksheets into one

    Hi A. Patel,

    Gee, this is almost identical to this thread I answered for psl this morning.

    Let us know how this goes:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  4. #4
    Registered User
    Join Date
    05-09-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Need Macro to combine multiple worksheets into one

    Hi Robert,

    The code worked great! but i need one small adjustment if anyone can help.

    When i run the macro it removes the formatting of the original worksheet - which messes up some of my data.

    For example, in the attached workbook, column "B" has product codes in a specific format in each of the individual tabs (Ontario..Quebec..Atlantic..etc.)

    But when i run the macro it removes the formatting and pastes the product code as a date in some instances... Is there a way to paste what is directly in the cells of each tab - and not just the values?

    Thanks again for your help!
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,442

    Re: Need Macro to combine multiple worksheets into one

    Hi A.Patel,

    See how this goes:

    Please Login or Register  to view this content.
    Regards,

    Robert

+ 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. Required Macro for combine multiple workbooks which contains multiple worksheets
    By DHANASEKARAN in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-06-2013, 03:20 PM
  2. Macro to combine multiple worksheets
    By joyhampton in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2013, 02:30 PM
  3. [SOLVED] Macro to combine multiple cells from multiple worksheets into one worksheet
    By sharpmarc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-20-2013, 02:42 PM
  4. [SOLVED] Using Combine macro to combine multiple worksheets - need to modify to paste formulas
    By DLSmith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2012, 09:07 AM
  5. A macro to combine multiple worksheets
    By alloutdoors681 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-04-2011, 07:48 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