Compare Names between two files and get a address

nt_beans

New Member
Joined
Nov 10, 2015
Messages
26
Hello,
I've two excel files (A and B ). File A got Names of 1000 employees of our firm. File B is complete list and got names of 35000 employees of our firm including their location and country.
A macro should compare names between File A and B and populate Location in File A after looking up in File B

Example:
File A
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD]Andrew Corey[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Michael Wilson[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

File B

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Location[/TD]
[TD]Country[/TD]
[/TR]
[TR]
[TD]Richard Spicer[/TD]
[TD]New York[/TD]
[TD]USA[/TD]
[/TR]
[TR]
[TD]Michael Wilson[/TD]
[TD]Chicago[/TD]
[TD]USA[/TD]
[/TR]
[TR]
[TD]Rajesh Sharma[/TD]
[TD]Barcelona[/TD]
[TD]Spain[/TD]
[/TR]
[TR]
[TD]Andew Corey[/TD]
[TD]Seattle[/TD]
[TD]USA[/TD]
[/TR]
</tbody>[/TABLE]

Desire OutPut
A macro should compare names between File A and B and populate Location in File A after looking up in File B

File A
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD]Andrew Corey[/TD]
[TD]Seattle[/TD]
[/TR]
[TR]
[TD]Michael Wilson[/TD]
[TD]Chicago[/TD]
[/TR]
</tbody>[/TABLE]


Hope someone can assist with my issue.

thanks
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
The difference is the other languages have been fully developed or are continuously being improved and having new versions released.

VBA is neither...its "unfinished"....Abandoned by Microsoft to focus on bigger and better things. When was the last meaningful VBA release?
VBA was last upgraded in 2010, to version 7. Since then, it has been updated for Office 2016. See:
https://msdn.microsoft.com/en-us/VBA/office-shared-vba/articles/what-s-new-for-vba-in-office-2016
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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