Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I need all the rows which contain data to repeat a certain number of
times. My attempt works perfectly for the first row, but stops there. Sub Try() Range("G2").Select StartVal = Val(InputBox("Enter how many lines per order: ")) Do While Not IsEmpty(ActiveCell.Value) For counter = 1 To (StartVal - 1) ActiveCell.EntireRow.Copy ActiveCell.Offset(1).EntireRow.Insert ActiveCell.Offset(1).EntireRow.PasteSpecial Next counter Loop End Sub Thanks for any help. Mike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Looping Macro to Find and Mark | New Users to Excel | |||
macro loop | Excel Discussion (Misc queries) | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) | |||
How to incorporate Loop feature | Excel Discussion (Misc queries) | |||
VBA Newbie: Help with Do Loop code | Excel Discussion (Misc queries) |