+ Reply to Thread
Results 1 to 9 of 9

compare list B with list A, return cell data on row where B matched A

  1. #1
    Registered User
    Join Date
    01-03-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    13

    compare list B with list A, return cell data on row where B matched A

    Hi - I need a function or at least pointed in the right direction...

    List A was made from a MYSQL dump and has 3,000+ entries, in order, via an ascending key generated by the DB when each record was added. (ie., 1,2,3,4 ... 7,390)

    List B was made from the same dump but only has 1,000 entries, not in order but uses the same set of keys to match those records to the master table records. (4, 350, 122, 123 ...)

    Apparently over time, some records in A were deleted leaving some numbers out of the key sequence (ie., 1,2,4,8,9 ...) - this is why there are only 3,000 records but the key ends at 7,390!

    Also the info in table B must have been optional as there are only 1,000 entries - 1/3 of the master list to which it is paired with.



    I need a function that will compare the key column in table B to table A and extract data from the corresponding cell in a different column on the same row in table B THEN list it in the correct row / cell in table A. In layman terms, I am trying to match email addresses in table B to the correct contacts in table A and 2/3rd's of the emails were never filled in so the only way to pair them up is by matching the keys.

    I know nothing about Excel functions but I've been researching and think this may be a job for =vlookup? or some iteration thereof. Please help!!!

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: compare list B with list A, return cell data on row where B matched A

    Hi,
    Welcome to the Forum.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    01-03-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    13

    Re: compare list B with list A, return cell data on row where B matched A

    here is the sample as requested ...

    sample.xlsx

    As you can see the function needs to be smart enough to overlook orphaned data in table-B that doesn't have a matching donor_id key in table-A

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: compare list B with list A, return cell data on row where B matched A

    Try this.....
    On Table A sheet
    In F2
    Please Login or Register  to view this content.
    and copy down.

  5. #5
    Registered User
    Join Date
    01-03-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    13

    Re: compare list B with list A, return cell data on row where B matched A

    Thank you very much for the Formula!

    When I use it I have a problem with entries that are blank on table-b, they show up as 0 in the corresponding cell in table-a.


    I worked around it by copying table-A data into another column then running
    Please Login or Register  to view this content.
    and copying down. That removed the unwanted zeros but kept the true data intact.


    For my own learning, any solution to IFERROR adding zeros in your original formula? Thanks again
    Last edited by master-richie; 01-03-2015 at 08:49 PM.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: compare list B with list A, return cell data on row where B matched A

    In that case you may try this...

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-03-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    13

    Re: compare list B with list A, return cell data on row where B matched A

    Quote Originally Posted by sktneer View Post
    In that case you may try this...

    Please Login or Register  to view this content.
    that is a lot more complicated!

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: compare list B with list A, return cell data on row where B matched A

    Did it work or not?

  9. #9
    Registered User
    Join Date
    01-03-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    13

    Re: compare list B with list A, return cell data on row where B matched A

    I have not tried it yet. Is 01:00 am where I live. I will try it in the morning when I get in front of my computer again.

+ 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. [SOLVED] Compare Input to a list - return what is in the cell to the right.
    By Nitefoxxx in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-02-2014, 06:29 PM
  2. Replies: 0
    Last Post: 07-21-2013, 05:12 AM
  3. Compare two List and Sort matched values
    By turist in forum Excel General
    Replies: 9
    Last Post: 03-22-2013, 01:47 AM
  4. Compare 2 Worksheet and List All Items that Matched
    By Vinnie Chan in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-13-2010, 02:09 PM
  5. Replies: 2
    Last Post: 01-01-2010, 10:26 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