+ Reply to Thread
Results 1 to 5 of 5

Return multiple values based on one matching field

  1. #1
    Registered User
    Join Date
    06-06-2016
    Location
    PA, US
    MS-Off Ver
    Office 2013
    Posts
    3

    Return multiple values based on one matching field

    I have two lists of data - one is email addresses and ID numbers from our old database system, the other is email addresses with ID numbers from our new database system. The lists are not exactly the same and have enough differences to make this a pain to do manually. I basically want to find any matching email addresses between the two lists and return the corresponding old and new ID numbers for that person. Any suggestions? Thank you.

  2. #2
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2013
    Posts
    142

    Re: Return multiple values based on one matching field

    You should be able to use the vlookup formula to get the results you need, but without knowing how your two lists are setup is difficult to give the exact formula. Can you upload a sample workbook that shows the exact setup of your data?

  3. #3
    Registered User
    Join Date
    06-06-2016
    Location
    PA, US
    MS-Off Ver
    Office 2013
    Posts
    3

    Re: Return multiple values based on one matching field

    Thanks for the response. Right now the lists are separate spreadsheets - data that I've exported from our old and new database systems. I've attached a sample workbook with separate sheets for OLDID and NEWID data. I'd like to end up with a list of First Name, Last Name, Email Address, OLDID, NEWID - if possible.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2013
    Posts
    142

    Re: Return multiple values based on one matching field

    Sorry for the delay in responding. Based on the way the data is arranged on the OLDID and NEWID sheets we'll need to use the INDEX/MATCH formula instead of VLOOKUP.
    The first step would be to create a 3rd tab can copy the First Name, Last Name and Email. You'll want to remove any duplicate email addresses if there are any. Then create an Old ID column and a New ID column. Your formula in the

    Old ID column would be something along the lines of:

    =IFERROR(INDEX(OLDID!C2:C20,MATCH(C2,OLDID!D2:D20,0)),"Not Found")

    The part in Red is the range that contains the Old ID numbers. The part in Green is the range of email addresses on the OLD ID sheet

    Your formula in the New ID column would be something along the lines of:

    =IFERROR(INDEX(NEWID!C2:C18,MATCH(C2,NEWID!D2:D18,0)),"Not Found")

    The part in red is the range of the New ID numbers. The part in green is the range of email addresses on the NEWID tab.

    You'll have to adjust the formula based on the actual range size. Paste those formulas in row 2 of the OLD ID and NEW ID columns on the third sheets respectively, and copy down.
    Attached Files Attached Files
    Last edited by mo4391; 06-07-2016 at 04:58 PM. Reason: fixed formula

  5. #5
    Registered User
    Join Date
    06-06-2016
    Location
    PA, US
    MS-Off Ver
    Office 2013
    Posts
    3

    Re: Return multiple values based on one matching field

    Sorry for the delay in this response, but this worked brilliantly! Thank you so much!

    The one change that I made was to add a $ to some of the cell references to lock them and keep them from incrementing when copying, i.e.

    =IFERROR(INDEX(OLDID!C$2:C$20,MATCH(C2,OLDID!D$2:D$20,0)),"Not Found").

    Thanks 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. Vlookup to return multiple values for duplicate matching keys
    By abc_123excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-04-2013, 09:58 PM
  2. [SOLVED] Matching multiple cells and return certain values
    By JakeMann in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-14-2012, 08:18 AM
  3. matching values based on criteria and return values from another columns
    By lizard54 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 11:29 AM
  4. Replies: 6
    Last Post: 01-22-2012, 12:39 PM
  5. [SOLVED] Return value based on matching across multiple columns
    By cde1983 in forum Excel General
    Replies: 3
    Last Post: 12-20-2011, 09:34 PM
  6. Replies: 7
    Last Post: 12-03-2011, 03:42 PM
  7. Replies: 3
    Last Post: 11-24-2011, 09:55 AM
  8. Return Y/N after matching from multiple lookup values separated by comma
    By indoglans in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2011, 03:13 PM

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