ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro to copy data from One sheet to another (https://www.excelbanter.com/excel-discussion-misc-queries/127201-macro-copy-data-one-sheet-another.html)

Jurassien

Macro to copy data from One sheet to another
 

Hello,

Can someone help me in creating a macro that will copy data from one
worksheet and paste it to a new worksheet? The code below move data within
the same worksheet. Please Helps!

Public Sub CopyOne()
Worksheets("Sheet1").Activate
'Range("E1:E7").Copy Range("F2:F7")


End Sub

Dave Peterson

Macro to copy data from One sheet to another
 
Public Sub CopyOne()
Worksheets("Sheet1").Range("E1:E7").Copy _
destination:=worksheets("sheet2").Range("F2")
End Sub

Excel will expand that "to" range--just like when you do it manually.

Jurassien wrote:

Hello,

Can someone help me in creating a macro that will copy data from one
worksheet and paste it to a new worksheet? The code below move data within
the same worksheet. Please Helps!

Public Sub CopyOne()
Worksheets("Sheet1").Activate
'Range("E1:E7").Copy Range("F2:F7")


End Sub


--

Dave Peterson


All times are GMT +1. The time now is 08:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com