Copy and overwriting sheets

jsolomon

Board Regular
Joined
Mar 25, 2005
Messages
109
Hi,
Is there any way to copy a sheet from one book to another and have it overwrite the sheet insead of it renaming it?

Thanks,

Joe
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Joe

What exactly do you mean?

Do you want to copy the data from 1 workbook to a pre-existing sheet in another workbook?
Code:
Workbooks("Book1.xls").Worksheets("Sheet1").Cells.Copy Workbooks("Book2.xls").Worksheets("Sheet2").Range("A1")
 
Upvote 0
Sorry I still don't get what you mean.

Can you explain further?

The code I posted will copy everything.
 
Upvote 0
I want to copy Sheet 1 from Source workbook to Sheet 1 in Destination workbook. I would like it to overwrite Sheet 1 in the Dest. book. I tried the code you suggested, and everything but the Reference Names are copying over. Any other ideas? Thanks for your help.

Joe
 
Upvote 0
Joe

What do you mean by 'Reference Names'?
 
Upvote 0
So you mean a named range?
Code:
Workbooks("Book1.xls").Worksheets("Sheet1").Copy After:=Workbooks("Book2.xls").Worksheets("Sheet2").
I still don't quite understand what you mean by this.
have it overwrite the sheet insead of it renaming it?
 
Upvote 0
when i right click the sheet tab, hit copy, and copy it over, becasue the other one has the same name it will just rename it 'Sheet1 (1)'
 
Upvote 0

Forum statistics

Threads
1,214,431
Messages
6,119,457
Members
448,898
Latest member
drewmorgan128

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