+ Reply to Thread
Results 1 to 5 of 5

Merging 2 files/tables with common variable

  1. #1
    Registered User
    Join Date
    04-07-2010
    Location
    new york, usa
    MS-Off Ver
    Excel 2003
    Posts
    1

    Merging 2 files/tables with common variable

    Hi all,



    I wonder if it's possible to merge two or more excel files(or access tables or some way with programming involved)
    that has a common variable (id). However, the ids from the tables may or may not match.




    Here is an illustration of what I want(shown below are TABLE 1, TABLE 2, and the TABLE that I want after merge):

    Table 1:

    id address office

    1 1 1
    3 1 2
    6 2 2
    8 1 4
    10 4 3


    Table 2:

    id postal money

    1 1 2
    4 2 2
    6 1 1
    7 1 3
    9 4 3


    TABLE after the merge:

    id address office postal money

    1 1 1 1 2
    3 1 2 - -
    4 - - 2 2
    6 2 2 1 1
    7 - - 1 3
    8 1 4 - -
    9 - - 4 3
    10 4 3 - -



    I hope I am clear!

    Any help would be much appreciated!

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Merging 2 files/tables with common variable

    Please see the attachment. I've used VLOOKUP functions to merge the data sets.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-27-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Merging 2 files/tables with common variable

    The solution is exactly what I am looking for.
    Unfortunately, I can't figure out how the solution in Book1.xls works!
    Could you elaborate on the VLOOKUP function?
    I am not an IT person but an end-user.
    Many thanks.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Merging 2 files/tables with common variable

    Suggest looking at help within Excel where there is a good explanation.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Merging 2 files/tables with common variable

    Limmunsum,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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