Finding similar value from one list in another list

Dkeller12

Board Regular
Joined
Oct 7, 2011
Messages
60
On Sheet 1 I have a list of employee names (John, Bob, Ross etc...)in column A and in column B I have a list of employee bonus points (1, 5, 3 etc...). On Sheet 2 I have the same setup but the list of employees on sheet 2 is a lot longer than the ones on sheet 1, all employee names are on sheet 2.

I need a macro that will go down to each name on the list on sheet 1, column A, and copy the employee bonus points then go to sheet 2 and find the that employees name in the list and paste the bonus points in column B. This must be done until the last name on sheet 1 is found and all points are copied to their corresponding names on sheet 2.

Please help! Thanks!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Welcome to the Forum.
Macro is not really needed.
IN Sheet2 in cell B1 type this formula:

=VLOOKUP(A1,Sheet1!A:B,2,FALSE)

Copy this formula down column B till the names in col A end.

This will get all the bonus points for the employees whose names figure in Sheet1.
For all other (new?) employees, you will get an #N/A.

You can then select the whole B col -> Rightclick-->Cop-->Paste special-->paste values to convert formulas to values.
 
Upvote 0
That worked perfectly. So strange, but I am very familiar with the Vlookup function but was so stuck on adding it to macro coding that I overlooked the obvious.

Thanks for your help.
 
Upvote 0

Forum statistics

Threads
1,215,730
Messages
6,126,527
Members
449,316
Latest member
sravya

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