copy whole worksheet

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Copy whole worksheet

Copy whole worksheet

resolvedResolved · Low Priority · Version 2003

Alison has attended:
Excel VBA Intro Intermediate course
Excel Pivot Tables course
Excel Dashboards for Business Intelligence course
Advanced Excel Dashboards course
Excel Dashboards for Business Intelligence course

Copy whole worksheet

Hi,

I was hoping you could help with some code to copy a whole worksheet or large block of data into another worksheet (without creating a new worksheet and other than using the copy/paste or loop commands which are running slowly at the moment).

I have found some code using google but have been getting errors with it.

Thanks,

Alison

RE: Copy whole worksheet

Hi Alison

Thanks for your question.

If you are copying a whole block of data in its entirety then it may be quicker to use the copy paste method.

Sheets("source").select
Range("A1").currentregion.select
selection.copy
Sheets("target").select
range("A1").select
activesheet.paste


Usually it is bad practice to use the select method as it slows down code execution. In this instance however it might be your best option

Regards

Stephen


Wed 12 May 2010: Automatically marked as resolved.


 

Excel tip:

Adding date and time

Here are two quick ways to add the date and time to your spreadsheet:

1) Type =NOW(), which displays both date and time in the same cell
or
2) Hold Ctrl and type the colon (:) into one cell for the date and the semi-colon(;)into another for the time.

Note that =NOW() updates to the current date/time whenever the spreadsheet recalculates.

View all Excel hints and tips


Server loaded in 0.1 secs.