Copy Used Range to another Workbook

billandrew

Well-known Member
Joined
Mar 9, 2014
Messages
743
Seems so simple not sure what I am doing here

trying to copy used range in Book4 to Book5 or entire sheet..

Sheets("Sheet1").UsedRange.Copy Workbooks("Book5.xlsx").Sheets("Sheet1")
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
It is actually pretty simple, but there are a few things that should be specified.
Are trying to copy all the sheets? Is it alway going to be Book4 to Book5? It looks like book 5 is not macro enabled; that is probably okay as the macro will be in Book4. Is it always sheet1 to sheet? Do the sheets in Book5 already exist? Should any existing data in Book5 be deleted? Should data in Book5 be overwritten?

Ken
 
Upvote 0
My apologies. I did not see your response.

I am trying to copy one sheet from a workbook to another workbook. Yes maybe data might need to be deleted. Do not overwrite existing data.

TY
 
Upvote 0
You need to specify the top left cell of the destination range. (And the source workbook, just to be safe.)
Code:
Workbooks("sourceBook.xlsx").Sheets("Sheet1").UsedRange.Copy destination:=Workbooks("Book5.xlsx").Sheets("Sheet1").Range("A1")
 
Upvote 0

Forum statistics

Threads
1,213,482
Messages
6,113,908
Members
448,532
Latest member
9Kimo3

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