Home |
Search |
Today's Posts |
#1
|
|||
|
|||
copy 45 rows down, repetativly, only on button click?
Try... ------------------------------------ Private Sub CommandButton1_Click() Row = 7 ' adjust starting point as needed Range("A" & Row).EntireRow.Copy For i = 0 To 1000 Step 45 'adjust to meet your needs If Range("A" & Row + i) = "" Then Range("A" & Row + i).PasteSpecial Next i End Sub ------------------------------------ Does this work for you? -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=373342 |
#2
|
|||
|
|||
Try... ------------------------------------ Private Sub CommandButton1_Click() Row = 7 ' adjust starting point as needed Range("A" & Row).EntireRow.Copy For i = 0 To 1000 Step 45 ' adjust to meet your needs If Range("A" & Row + i) = "" Then Range("A" & Row + i).PasteSpecial Next i End Sub If a row has data in A, it will not paste, then skip another 45 rows and repeat.... Does this work for you? -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=373342 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy exact values from RangeA to Range B which has extra rows | Excel Discussion (Misc queries) | |||
Using Command Button to copy cells | Excel Discussion (Misc queries) | |||
How to copy values in various rows automatically | Excel Discussion (Misc queries) | |||
Activate a macro to insert a row and copy the formuals from the rows above to the blank row | Excel Discussion (Misc queries) | |||
copy / paste selective rows | Excel Discussion (Misc queries) |