Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Missing a line (Simple)

The following is a simple recorded macro, nothing written by myself bu
what I am looking for is to repeat these same steps over multipl
sheets but the problem I have is finding the line of code to put befor
each paste that will make sure I am pasting just below the previou
paste. The sheets are all of varying length so I can never be sur
which cell will be the bottom cell.

Thanks for the help.

Sub Master_Copy2()

Sheets("L-96").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Master").Select
ActiveSheet.Paste
Range("A1").Select
Sheets("L-95").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Master").Select


End Su

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Missing a line (Simple)

Jayhawk,

Sub Master_Copy3()
Dim mySht As Worksheet

For Each mySht In Worksheets(Array("L-96", "L-95", "L-94"))
mySht.Range("A1").CurrentRegion.Copy _
Sheets("Master").Range("A65536").End(xlUp)(2)
Next mySht

End Sub

HTH,
Bernie
MS Excel MVP

"Jayhawktc " wrote in message
...
The following is a simple recorded macro, nothing written by myself but
what I am looking for is to repeat these same steps over multiple
sheets but the problem I have is finding the line of code to put before
each paste that will make sure I am pasting just below the previous
paste. The sheets are all of varying length so I can never be sure
which cell will be the bottom cell.

Thanks for the help.

Sub Master_Copy2()

Sheets("L-96").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Master").Select
ActiveSheet.Paste
Range("A1").Select
Sheets("L-95").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Master").Select


End Sub


---
Message posted from http://www.ExcelForum.com/



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
Simple calc not working as expected - what am I missing? MarianneS40 Excel Discussion (Misc queries) 7 October 12th 09 05:03 PM
Tab Line Missing julieanne325 Excel Discussion (Misc queries) 1 March 27th 09 10:12 PM
Data entry line missing tedcal Setting up and Configuration of Excel 4 August 15th 08 11:13 PM
Line chart even though values missing MattBeckwith Charts and Charting in Excel 1 January 17th 06 08:42 PM
Probably missing something simple in loop macro...Please help Jules[_6_] Excel Programming 3 April 15th 04 05:16 AM


All times are GMT +1. The time now is 12:12 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"