+ Reply to Thread
Results 1 to 4 of 4

Macro To Merge Tables in a WorkBook

  1. #1
    Registered User
    Join Date
    11-05-2014
    Location
    Lafayette California
    MS-Off Ver
    2013
    Posts
    24

    Macro To Merge Tables in a WorkBook

    Hi,

    I am trying to figure out a way to merge the tables i have on separate tabs into one table on another tab. I have uploaded a sample file with the desired out come. Also, as you will see, i would like to show the Reference Number of the table. Ex. Table1 would give 1 or even just Table1. I dont know if i am being to vague or not. Any help is greatly appreciated!
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Macro To Merge Tables in a WorkBook

    Try this:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    11-05-2014
    Location
    Lafayette California
    MS-Off Ver
    2013
    Posts
    24

    Re: Macro To Merge Tables in a WorkBook

    alan,

    This works decently well, better than i am capable of. However if the master table already has rows in it the copied data gets spaced strangely. It works fine if there is only one row in the master table, except that when you run the macro the formatting is like the table but you cant sort and filter. you have to first clear the formats and then drag the table range down to cover cover the copied data. from there you can use like normal. this is a good starting point.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Macro To Merge Tables in a WorkBook

    The issues are generated because you have the master sheet as an Excel Table. Change it from a table to a data range and you should be able to avoid those issues you encountered. Do you really need it formatted as a table? This is a Rhetorical question for you and does not require a response.

    Alan

+ 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. Replies: 4
    Last Post: 07-06-2012, 01:55 PM
  2. macro for tables merge by a variable
    By peeriti in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2011, 12:36 AM
  3. Macro To Merge All Sheets In Workbook Into New Workbook
    By JimmiOO in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-06-2010, 09:38 AM
  4. Macro to Merge Worksheets into a Workbook
    By andrewc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2008, 09:49 AM
  5. [SOLVED] Excel VBA Merge Workbook tables Central table
    By bbcdancer@hotmail.com in forum Excel General
    Replies: 1
    Last Post: 01-15-2006, 11:20 AM

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