+ Reply to Thread
Results 1 to 12 of 12

Merge Worksheets

  1. #1
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Merge Worksheets

    I need to merge for worksheets (in the same workbook) into 1 large worksheet.

    Is there a command that does this? Or do you guys have a custom macro that does this?
    Last edited by newbieexceldude; 05-11-2009 at 09:01 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Merge Worksheets

    What specifically do you mean by "merge"? Is it more complex than copying all of the data on one sheet, and pasting it into the other sheet (and then sorting or arranging as needed)?

    If your situation is more complex, please provide more detail.

  3. #3
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Re: Merge Worksheets

    Thanks for your reply

    I really just need a replacement for cutting and pasting.

    Each sheet has about 12 columns (A - L) and some have more rows than others, but not more than 200 per sheet.

    Does this help?

  4. #4
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Merge Worksheets

    hi,

    Edit: Sorry Paul, I didn't see your post when I typed this up.
    ...

    Yes, custom macros can be written to do this. You may find some useful techniques on Ron's page: http://www.rondebruin.nl/copy2.htm which I found by Googling http://www.google.co.uk/search?hl=en...erge+sheets%22

    If you have further questions, can you please post a dummy workbook with the layout so that helpers can see the context & provide an accurate customised solution for you?

    hth
    Rob
    Last edited by broro183; 05-09-2009 at 07:49 PM.
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  5. #5
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Re: Merge Worksheets

    Thanks for your reply and the link.

    I tried using his macro, but I kept getting an error. I'm not sure why.

  6. #6
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Merge Worksheets

    Can you please provide more details...?

    Which of Ron's macros?
    What line does the code stop on (ie highlight yellow)?
    Can you please upload an example file for users to work from?

    Rob

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Merge Worksheets

    Maybe something very basic like this:

    Please Login or Register  to view this content.
    This macro creates/replaces a sheet called MERGE in the existing workbook and copies all data from sheet1 to sheet(last) one below the other.
    Last edited by JBeaucaire; 05-11-2009 at 06:58 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  8. #8
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Re: Merge Worksheets

    Dude, you're awesome! Works like a charm, except 1 small detail.

    It creates an extra row separating the data from each page. No big deal though.

    Thanks again. This really helps me out!
    Last edited by shg; 05-11-2009 at 06:54 PM. Reason: Deleted spurious quote

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Merge Worksheets

    First, look back in the code I posted, you'll see a bit in red...change that to a 1 to eliminate the space, which i put in on purpose to make the pages evident.

    Second, if that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED].




    (Also, use the "scales" icon in our posts to leave Feedback, it is appreciated)

  10. #10
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Merge Worksheets

    hi JB,

    Just curious, why did you declare ws as an object rather than as a worksheet?

    Rob

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Merge Worksheets

    Slip of the finger...harmless interchangeability in this instance.

  12. #12
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Merge Worksheets

    lol
    Yes, harmless, but it does mean there is limited (no?) Intelli-sense when working with the code.
    Anyway - it's mission accomplished now.


    R

+ 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