+ Reply to Thread
Results 1 to 3 of 3

Comparing and extracting data from 2 lists

  1. #1
    Registered User
    Join Date
    12-05-2013
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Comparing and extracting data from 2 lists

    I am looking for a formula that will extract data from 1 work sheet for use in another work sheet.

    I have 2 lists of names (surnames). List A is an overall list of names. List B is a list containing some of those names but with associated data attached to that name (in 5 columns; D:H). List A has 750 names in it and list B has 150 names.

    I need to compare the 2 lists of names and where a name appears in list A and list B copy the data contained in List B columns D:H to the corresponding name in List A.

    Any suggestions for a formula?

    Thanks

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Comparing and extracting data from 2 lists

    hi blue5ky. sounds like a VLOOKUP. i'm just going to teach you how to apply it. Say you have data like these:
    List A
    Data Range
    A
    1
    Names
    2
    Andy
    3
    Benne
    4
    Catherine
    5
    Danny
    6
    Elaine

    List B
    Data Range
    A
    B
    C
    D
    E
    F
    G
    H
    1
    Names
    D1
    D2
    D3
    D4
    D5
    2
    Benne
    2_4
    2_5
    2_6
    2_7
    2_8
    3
    Catherine
    3_4
    3_5
    3_6
    3_7
    3_8
    4
    Danny
    4_4
    4_5
    4_6
    4_7
    4_8

    in B2 of List1, try:
    =VLOOKUP(A2,Sheet2!A:D,4,0)

    that is to look for A2 (Andy) in Sheet2 where List2 is in Column A. I have to range A:D because what I want is in Column D. and you need to tell Excel that Column D is 4 columns away from A. Lastly, put in the zero for exact match. you will get N/A because Andy is not in List2. to hide this error, you can use IFERROR
    =IFERROR(VLOOKUP(A2,Sheet2!A:D,4,0),"")

    to get Column E would be:
    =VLOOKUP(A2,Sheet2!A:E,5,0)

    next time though, do upload a sample excel file. then it's easier to customise. i'm not going to, since i already guided you through. To upload, Click on GO ADVANCED and use the paperclip icon to open the upload window.
    View Pic
    and to illustrate your example better, click on How To Get Quick & Good Answers

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    12-05-2013
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Comparing and extracting data from 2 lists

    No luck as yet. The formula seems to just sit there and no value is given. This is the formula in cell E18 (List A)
    This is what I actually see in the cell =IFERROR(VLOOKUP(A!D18,B!A2:H2,5,0),"")

    I have run Evaluate Formula and the answer given is (#N/A) but this is not shown, the formula is shown. Why does it show the formula and not the answer?
    Last edited by blue5ky; 01-15-2014 at 03:19 AM.

+ 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. Comparing 2 lists of data
    By bd528 in forum Excel General
    Replies: 3
    Last Post: 06-25-2009, 03:47 AM
  2. Replies: 1
    Last Post: 10-19-2007, 08:31 AM
  3. Comparing 2 sheets and extracting all data
    By Scotlandyard in forum Excel General
    Replies: 2
    Last Post: 01-19-2007, 05:39 PM
  4. Comparing two lists and extracting data from one to another
    By Clement in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-12-2006, 02:40 PM
  5. Comparing two ranges and extracting non duplicate data
    By Knut Dahl in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-26-2005, 09:07 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