+ Reply to Thread
Results 1 to 4 of 4

How to Combine two sets of data in excel

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    Orlando, Florida
    MS-Off Ver
    Excel 2003
    Posts
    5

    How to Combine two sets of data in excel

    Hello, i am having an issue combine to sheets of data.

    The first looks like this:

    Item Items Sold Item Code
    A 1 B700
    B 3 B710
    C 2 B712
    D 4 B714
    E 7 B715

    And the second like this:

    Item Code
    B700 MH-40542 MH-44627 MH-62045 MH-13999 MH-19462
    B710 MH-13999 B700 MH-44627
    B712 MH-44627 MH-13999
    B714 MH-13999 B700 MH-44627
    B715 MH-13999 B700 MH-44627

    Both lists are very long and i need to take the second and combine it with the first so that all of the items on the second show up next to their corresponding item on the same row.

    For example, i want the first to look like this:

    Item Items Sold Item Code
    A 1 B700 MH-40542 MH-44627 MH-62045 MH-13999 MH-19462

    Thank you in advance for any help!
    Last edited by Jchhoule; 05-16-2012 at 02:58 PM.

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to Combine two sets of data in excel

    Use the VLOOKUP() function:

    http://www.excelfunctions.net/ExcelVlookup.html

  3. #3
    Registered User
    Join Date
    05-09-2012
    Location
    Orlando, Florida
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to Combine two sets of data in excel

    Thanks for the help, but i cannot get it to work. I have tried everything i can think of. I am attaching the file. If someone could look at it and tell me what im doing wrong. I would greatly appreciate the help!
    Attached Files Attached Files

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to Combine two sets of data in excel

    Try this in cell D2 (and copied over and down as far as you need):

    =IF(ISNA(VLOOKUP($C2,Sheet2!$A:B, COLUMN(B1), 0)),"",VLOOKUP($C2,Sheet2!$A:B, COLUMN(B1), 0)&"")

    or

    =IF(ISNUMBER(MATCH($C2,Sheet2!$A:$A,0)),INDEX(Sheet2!B:B,MATCH($C2,Sheet2!$A:$A,0))&"","")
    Last edited by Cutter; 05-10-2012 at 07:07 PM. Reason: Added alternative formula

+ 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