VBA/Macro help

paleaux

Board Regular
Joined
Apr 3, 2010
Messages
57
Ok I have a multi sheet workbook that Iam trying to populate the main sheet "Timesheet" with data from another sheet called "Gate Log"
The Gate Log sheet will change everyday and perhaps even twice a day.

"Timesheet" (Contractor Name) B2:B300 needs to be populated with data from sheet "Gate Log" (Company Name) A2:A300

"Timesheet" (Employee Name) C2:C300 needs to be populated with data from sheet "Gate Log" (Name) B2:B300

"Timesheet" (Date) D2:D300 needs to be populated with data from sheet "Gate Log" (Work Date) D2:D300

I would be very appreciative to anyone who can lead me in the right direction. I am not very up to speed on vba but trying to learn everyday.
Making some progress but not nearly as quickly as I would like.

Thanks to all...
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi,
Code:
Sub Test()
    Worksheets("Gate_Log").Range("A2:B300").Copy Worksheets("Timesheet").Range("B2")
End Sub

Your Gate Log worksheet name is invalid because it has a space while excel does not allow it.
The above code will copy A2:B300 from Gate log to B2:C300 of Timesheet.
The D2:D300 can be copied in a similar fashion.
 
Upvote 0

Forum statistics

Threads
1,224,558
Messages
6,179,512
Members
452,921
Latest member
BBQKING

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