soudoughnibblers
New Member
- Joined
- May 29, 2011
- Messages
- 2
Hi, I've been struggling (since I don't know much VBA) on how to write a simple Excel 2010 macro. Basically, I want to copy five specific blocks from every sixth row, and then paste those five blocks on the rows between every sixth row. These sets of five rows are currently empty. Here's the script I have that doesn't work:
Thanks in advance for your help!
Code:
Sub spacing()
Dim i As Integer
For i = 2 To 3956 Step 6
Range("Ii:Li").Copy
Range("Ei+1:Hi+1").Paste
Range("Mi:Pi").Copy
Range("Ei+2:Hi+2").Paste
Range("Qi:Ti").Copy
Range("Ei+3:Hi+3").Paste
Range("Ui:Xi").Copy
Range("Ei+4:Hi+4").Paste
Range("Yi:ABi").Copy
Range("Ei+5:Hi+5").Paste
Next i
End Sub
Thanks in advance for your help!