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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Maybe:

Excel 2010
ABC
1JohnDoeemail@msn.com
2JaneSmith
3MarkTrailemail2@yahoo.com
4SandraDee
5FrankJonesemail3@gmail.com
6

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
C1=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)))),"")&""

<tbody>
</tbody>

<tbody>
</tbody>



Excel 2010
ABC
1JohnDoeemail@msn.com
2MarkTrailemail2@yahoo.com
3FrankJonesemail3@gmail.com
4
5
6
7
8

<tbody>
</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,216,822
Messages
6,132,916
Members
449,768
Latest member
LouBa

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