Vlookup or Index or other?

lgonzales

New Member
Joined
Jan 4, 2016
Messages
2
Hello,

I am seeking some help with a problem I am having. I have one Excel Workbook with 2 sheets.

Sheet 1 has a list of all active employees. Sheet contains columns for FName and LName. Total rows = 935

Sheet 2 has a list of employees with an email address. Sheet contains columns for FName, LName and Email Address. Total rows = 450.

Need help to compare both sheets. If FName and LName on Sheet 1 are found on Sheet 2 then have email address entered into column on Sheet 1.

Any assistance is appreciated.

Thank you,
Leo
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Maybe:

Excel 2010
ABC
JohnDoeemail@msn.com
JaneSmith
MarkTrailemail2@yahoo.com
SandraDee
FrankJonesemail3@gmail.com

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: #DAE7F5"]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]C1[/TH]
[TD="align: left"]=IFERROR(INDEX(Sheet2!C:C,1/(1/SUMPRODUCT(--(Sheet2!$A$1:$A$500=$A1),--(Sheet2!$B$1:$B$500=$B1),ROW($B$1:$B$500)))),"")&""[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



Excel 2010
ABC
JohnDoeemail@msn.com
MarkTrailemail2@yahoo.com
FrankJonesemail3@gmail.com

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet2



Put the formula in C1 on sheet 1 and copy it down. Change the range references to match your sheet.

This requires Excel 2010 or later. It would also return an incorrect email address if Sheet2 has more than 1 address for a given name.

Let me know how that works.
 
Last edited:
Upvote 0
In B1 of Sheet1 control+shift+enter, not just enter, and copy down:

=IFERROR(T(INDEX(Sheet2!$C$1:$C$30,MATCH($B1,IF(Sheet2!$A$1:$A$30=$A1,Sheet2!$B$1:$B$30),0))),"")

If you have to many records to check, IFERROR can be replaced for more speed.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top