Forum Discussion
Matching an entry from 2 sets of data
Hi, and thanks in advance for any help.
I have one set of data (let's call this data set 1) that is email addresses (column1) and a user ID (column2) . I have another set of data (data set 2) pulled from a different source that has some email addresses.
DATA SET 1: Email addresses and user IDs
DATA SET 2: Email addresses
IF an email address from data set 2 matches an email address from data set 1, I want to add the user ID to data set 2 as another column.
How would you go about doing that?
So far I've used VLOOKUP to tell me if an email from DS2 exists in DS1, but I don't have the skill to be able to pull those user IDs over to match the email in DS2.
Hi,
You can use VLOOKUP as the example below.
Cell G4: =VLOOKUP(F4,$A$4:$B$12,2,0)
Please check out this https://support.office.com/en-us/article/VLOOKUP-function-0BBC8083-26FE-4963-8AB8-93A18AD188A1 to learn more about VLOOKUP function.
I hope that helps.
5 Replies
- Haytham AmairahSilver Contributor
Hi,
You can use VLOOKUP as the example below.
Cell G4: =VLOOKUP(F4,$A$4:$B$12,2,0)
Please check out this https://support.office.com/en-us/article/VLOOKUP-function-0BBC8083-26FE-4963-8AB8-93A18AD188A1 to learn more about VLOOKUP function.
I hope that helps.
- Kim-MS-Acct GronemanCopper ContributorThanks Haytham. That works perfectly!
- Lorenzo KimBronze Contributor
Mr. Amairah
Nice solution..
I have learned recently how to avoid #N/A by using IFERROR formula
= IFERROR(VLOOKUP(F4,$A$4:$B$12,2,0),"") or
= IFERROR(VLOOKUP(F4,$A$4:$B$12,2,0),"Not found!")
I hope I am correct...
thank you..
- Haytham AmairahSilver Contributor
Hi Lorenzo Kim,
Yes, that's correct.
But if you have Excel 2013 or later, I recommend you to use https://support.office.com/en-us/article/ifna-function-6626c961-a569-42fc-a49d-79b4951fd461 function instead.
IFERROR will hide all types of errors while IFNA is only for the #N/A error type.
The benefit is that you will be alerted if an error other than #N/A occurred.