+ Reply to Thread
Results 1 to 4 of 4

Merging two tables

  1. #1
    Registered User
    Join Date
    04-16-2008
    Posts
    4

    Merging two tables

    I would like to combine two tables. They have one common column(we could maybe assume common column is the first one from the left in the table), and same amount of rows. This is relatively fast to do manually, but doing this hundreds of times would make some macro handy.

    I have attached two excel files that includes examples. However the row and column number might change. I understand some VBA but can't write much code from empty table.

    I have thought two possibility
    1. Creating a macro that sorts tables by the common column and attach the second table without first column to the first table.

    or 2.Using vlookup or lookup functions.

    Any ideas for the solution? If you can provide any help for the code I would be delighted!

    I also found a few commercial programs, but they are not so handy that I would pay 30 dollars (Are there any free?).

    Thank you in advance for any tips!

    btw. I am using -excel 07
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-25-2008
    MS-Off Ver
    Excel, Outlook, Word 2007/2003
    Posts
    245
    This one is free.
    Please Login or Register  to view this content.
    Charlize

  3. #3
    Registered User
    Join Date
    04-16-2008
    Posts
    4
    Thank you really much for your help Charlize!

    However, I messed up with my post, my intention was to post another table(as now as an attachment) that has more columns. Instead, I posted the same table twice. The code worked great, but is there any way to make it so that it does this work no matter how many columns there are in tables?

    Thanks again..
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    03-25-2008
    MS-Off Ver
    Excel, Outlook, Word 2007/2003
    Posts
    245
    I think this will do the trick.
    Please Login or Register  to view this content.
    Charlize

+ 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