Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to let a user input a number corresponding to the
number of samples (e.g., 1-5). TO do this I plan on copying a series of rows (acting as a template) for example 4-9 and then paste this in starting at row 10 for each sample. So I would have identical rows starting at 4, 10, 15, etc (based on the user input) I can capture the user input and copy the 'template' rows with no problem. My question is how do I 'insert copies' at specific rows multiple times? Thanks for your help - Mark. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mark
Something like this, I think Sub MakeTemplate() Dim NoOfCopies As Long Dim i As Long NoOfCopies = Application.InputBox("Enter number of samples") For i = 10 To (NoOfCopies * 5 + 5) Step 5 Range("A4:A8").EntireRow.Copy Range("a" & i).Resize(5).EntireRow.PasteSpecial Next i Application.CutCopyMode = False End Sub -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "mark" wrote in message ... I need to let a user input a number corresponding to the number of samples (e.g., 1-5). TO do this I plan on copying a series of rows (acting as a template) for example 4-9 and then paste this in starting at row 10 for each sample. So I would have identical rows starting at 4, 10, 15, etc (based on the user input) I can capture the user input and copy the 'template' rows with no problem. My question is how do I 'insert copies' at specific rows multiple times? Thanks for your help - Mark. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Inserting numerous blank lines between specific rows of data | Excel Discussion (Misc queries) | |||
Copy Formulas when inserting rows | Excel Discussion (Misc queries) | |||
INserting Specific Number of Rows via macro | Links and Linking in Excel | |||
When Inserting Rows in Excel, not all formulas copy to new row? | Excel Discussion (Misc queries) | |||
inserting specific # of rows | Excel Discussion (Misc queries) |