LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default insert to hold data

Hi Gav,

Sub TestRows()
Dim NumberOfRows
Dim LoopCounter
Worksheets(1).Activate
' Insert here your existing code to copy data:
NumberOfRows = Selection.Rows.Count
Worksheets(2).Activate
' Insert here code to select right place to insert
For LoopCounter = 1 To NumberOfRows
ActiveCell.EntireRow.Insert
Next
' Then insert you existing code to paste
End Sub

It will need some work to fit into your existing
situation, but I've tested it at this end.

Regards,
Kai


-----Original Message-----
morning all,

How would i alter an existing code the copies and pastes

data so as to insert enough rows to hold the data that is
pasted. The target is the last row within the print area
and i would like the sheet to insert enough rows to hold
the pasted data so that it will appear within the print
area??

Cheers!!!!
.

 
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
I can't figure out how to hold chart references firm when inserting data Live Long & Prosper Excel Discussion (Misc queries) 3 October 22nd 09 07:56 PM
Hold conditional formatting when sorting filtered data Pyitty Excel Discussion (Misc queries) 1 July 6th 09 09:09 AM
when entry removed from source data pivot table hold in drop down EL in Melb. Excel Worksheet Functions 0 September 4th 06 06:21 AM
How much data can Excel hold. BLopes Excel Discussion (Misc queries) 1 June 20th 06 12:15 AM
Hold format from excel to data source for mail merging Frank3 Excel Worksheet Functions 2 October 5th 05 05:55 PM


All times are GMT +1. The time now is 02:17 AM.

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

About Us

"It's about Microsoft Excel"