ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   multiple copy / paste on locked sheet (https://www.excelbanter.com/excel-programming/309514-multiple-copy-paste-locked-sheet.html)

MD

multiple copy / paste on locked sheet
 
I have a sheet that has multiple cells that need to be copied (say A1, A3,
A5) from sheet1. These three cells need to be pasted on sheet2, in the same
order but offset by 100 lines (A101, A103, A105) and this sheet is locked
but the target cells are unlocked.

So far I can copy but I don't know how to paste?

Sub Macro1()
Sheets("Sheet1").Select
Range("A1,A3,A5").Select
Selection.Copy
Sheets("Sheet2").Select

' problem starts here!
Range("A101,A103,A105").Select
??????.Paste
End Sub

Regards
MD



Mike Fogleman

multiple copy / paste on locked sheet
 
Sub Macro1()
Sheet("Sheet2").Range("A101,A103,A105").Value =
Sheet("Sheet1").Range("A1,A3,A5").Value
End Sub

Or
Sheet("Sheet1").Range("A1,A3,A5").Copy Destination: =
Sheet("Sheet2").Range("A101,A103,A105")

Mike F

"MD" wrote in message
...
I have a sheet that has multiple cells that need to be copied (say A1, A3,
A5) from sheet1. These three cells need to be pasted on sheet2, in the

same
order but offset by 100 lines (A101, A103, A105) and this sheet is locked
but the target cells are unlocked.

So far I can copy but I don't know how to paste?

Sub Macro1()
Sheets("Sheet1").Select
Range("A1,A3,A5").Select
Selection.Copy
Sheets("Sheet2").Select

' problem starts here!
Range("A101,A103,A105").Select
??????.Paste
End Sub

Regards
MD






All times are GMT +1. The time now is 01:42 AM.

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