Monday, April 16, 2007

Copying A Range

Copy data from a specific range can be done with this macro. Here data is copied from the current sheet to the active cell. (Refer to Active Cell)
Sub CopyRange()
Range("A1:A3").Copy Destination:=ActiveCell
End Sub
To copy from a range in another sheet (eg Sheet3) to the active cell you need to change the code to;
Sheets("sheet3").Range("A1:A3").Copy Destination:=ActiveCell

No comments:

Post a Comment