Picking and copying data from another sheet

marcidee

Board Regular
Joined
May 23, 2016
Messages
163
Please can someone help with a formula or VBA script.


I have one workbook (payslip sort) that contains several sheets (one sheet per person that contains a breakdown of their pay) - I have another workbook (payslip macro) that contains a list of names in column A and next to their names in Column B their email address.


Is it possible to have a code that looks up the name on each sheet in (payslip sort) which can be find in A2 (see below example) - and search for that name in the other worksheet (payslip macro) (the list at present located in sheet2 - however this can be moved if that is a problem or even added to the main worksheet) - and copy the email address to i1 in payslip sort.

Payslip sort
NameP/E DateShiftCompanyLocationUnitsPay RateTotal Payzak@bbc.com
Zak Mon 29 Jul 2019NA - DayConstance xxxxxxxxxxxxxxxxxxxxxxxxxx.509.004.50
Zak Mon 29 Jul 2019NA - DayDermott xxxxxxxxxxxxxxxxxxxxxxxxxx45.009.00405.00
Zak Mon 29 Jul 2019NA - DayKelly xxxxxxxxxxxxxxxxxxxxxxxxxx1.009.009.00

<colgroup><col><col><col><col><col><col span="6"></colgroup><tbody>
</tbody>


Payslip macro (sheet2)
Zakzak@bbc.com
nigelnigel@itv.com
barrybarry@sky.com

<colgroup><col span="3"></colgroup><tbody>
</tbody>
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

Isn't it just a case of having a VLOOKUP?

i.e. = VLOOKUP(A2,(payslip macro, sheet 2 cols A & B),2,0)

you will need to change (payslip macro, sheet 2 cols A & B) to the actual workbook range.
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,130,200
Messages
5,640,802
Members
417,167
Latest member
apfelek

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
Top