copy paste from one workbook to another and find specific worksheet

RedOctoberKnight

Board Regular
Joined
Nov 16, 2015
Messages
150
Office Version
  1. 2016
Platform
  1. Windows
Good Morning.

I have a simple copy paste code from workbook to another but my question is, how do I get it to find a specific sheet based on value in C1 and paste there?

VBA Code:
Workbooks("Truck Schedule Builder.xlsm").Worksheets("SUN").Range("A2:D9").Copy _
    Workbooks("Truckschedulesduelsides.xlsm").Worksheets("Sun 4-3").Range("A2")

I want it to copy the Truck Schedule Builder worksheet and paste it into the truckschedulesduelsides workbook but find the specific sheet that has the same name as the value in C1 on original copy sheet (truck schedule builder)

Any help would be much appreciated.

Thanks,
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,090
Latest member
vivek chauhan

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