ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem copying range and pasting to multiple sheets (https://www.excelbanter.com/excel-programming/279165-problem-copying-range-pasting-multiple-sheets.html)

Murphy

Problem copying range and pasting to multiple sheets
 
I am trying to copy ("R17:X47") from Sheet1 and paste it in
("Y17:AE47") in each of the other Sheets. Any help is appreciated.

Thanks,
Murphy

Ron de Bruin

Problem copying range and pasting to multiple sheets
 
Try this

Sub Test()
Dim sh As Worksheet
Dim rng As Range
Application.ScreenUpdating = False
Set rng = Sheets("Sheet1").Range("R17:X47")
For Each sh In ThisWorkbook.Worksheets
If sh.Name < "Sheet1" Then
rng.Copy sh.Range("Y17")
End If
Next
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Murphy" wrote in message om...
I am trying to copy ("R17:X47") from Sheet1 and paste it in
("Y17:AE47") in each of the other Sheets. Any help is appreciated.

Thanks,
Murphy





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

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