+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : Matching data between files/tables

Hybrid View

  1. #1
    Registered User
    Join Date
    10-25-2010
    Location
    chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Matching data between files/tables

    Hello everyone, first post here, GREAT forum I'm sure I'm going to be coming here a lot!

    My question might be a bit hard to describe/understand.

    I have two excel files with one table in each file. In each file, the table contains (amongst other columns) two columns: "item" and "number". Now, in Table #1 I have a bunch of entries, with the "item" and "number" columns filled out and matched perfectly. Just the way I want it.

    Now, in Table #2, I have even MORE entries than Table #1. Included in the "item" column of Table #2 are ALL of the entries from Table #1 and more. However, the "number" column of Table #2 contains just random numbers, that sadly are nonsense and do not match up with the "item" column at all.

    For example, let's say that in Table #1 one row contains item="New Treadmill" and number="30". And in Table #2, a row contains item="New Treadmill" and number="4". What I would like to do is have all those "number" entries in Table #2 match up with the number entries in Table #1. So in this example, the row in Table #2 would also read item="New Treadmill" and number="30".

    If both tables contained the exact same "item" entries, it would be easy to accomplish this as I could just alphabetize the "item" columns for both and copy & paste the "number" column values from Table #1 to Table #2. But I cannot do this as both tables also contain other rows.

    I hope I did a good enough job explaining this problem. Any help is much appreciated!!!

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

    Re: Matching data between files/tables

    Use an empty column next to Table 2 to do a VLOOKUP() on the items in Table 2 looking them up Table 1 and returning the Table 1 number.

    =VLOOKUP(A2, '[Book2.xls]Sheet1'!$A:$B, 2, 0)
    _________________
    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!)

+ 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