Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default paste range from one sheet to each sheet after

Doesn't work....
Any clues?

Sub Macro1()
'
'copy range from template sheet
Sheets("Ind Templates").Select
Rows("38:50").Select
Selection.Copy

'for each sheet in workbook after "ind templates"
x = Sheets("Ind templates").Index
For Each Sh In ThisWorkbook.Sheets
If Sh.Index x Then

'paste the copied data 1row below the last row used
Range("A365").Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Select
Selection.Paste


End If
Next

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default paste range from one sheet to each sheet after

Hi

This should do it:

Sub Macro1()
'
Dim sh As Worksheet
'copy range from template sheet
Sheets("Ind Templates").Rows("38:50").Copy

'for each sheet in workbook after "ind templates"
x = Sheets("Ind Templates").Index
For Each sh In ThisWorkbook.Sheets
If sh.Index x Then
'paste the copied data 1row below the last row used
sh.Paste sh.Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
End If
Next
Application.CutCopyMode = False
End Sub

Hopes this helps.

---
Per

On 6 Maj, 21:40, "J.W. Aldridge" wrote:
Doesn't work....
Any clues?

Sub Macro1()
'
'copy range from template sheet
Sheets("Ind Templates").Select
Rows("38:50").Select
Selection.Copy

'for each sheet in workbook after "ind templates"
x = Sheets("Ind templates").Index
For Each Sh In ThisWorkbook.Sheets
If Sh.Index x Then

'paste the copied data 1row below the last row used
Range("A365").Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Select
Selection.Paste

End If
Next

End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default paste range from one sheet to each sheet after

THANX!!!

....you're a life saver!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default paste range from one sheet to each sheet after

purfecto!
thanx
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
paste range to all sheets after specified sheet J.W. Aldridge Excel Programming 2 May 8th 09 04:20 AM
Line count in sheet determines paste range in another sheet [email protected] Excel Programming 1 October 4th 08 01:26 PM
Line count in 1 sheet to determine paste range in 2nd sheet. [email protected] Excel Programming 0 September 26th 08 07:43 PM
Paste range from one sheet to another Dan Excel Programming 3 November 2nd 04 02:05 PM
Find range in one sheet, then paste in the other (one by one) cskgg[_6_] Excel Programming 3 August 13th 04 01:23 PM


All times are GMT +1. The time now is 07:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"