Picking and copying data from another sheet

marcidee

Board Regular
Joined
May 23, 2016
Messages
155
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>
 

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,615
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:

Forum statistics

Threads
1,085,219
Messages
5,382,411
Members
401,787
Latest member
hDalal

Some videos you may like

This Week's Hot Topics

Top