Inserting rows

  • Thread starter Thread starter Guest
  • Start date Start date
Starting at which row? You can tweak something like this to your
needs.
Sub foo()
Dim n As Long
n = 6
botrow = Cells(Rows.Count, 1).End(xlUp).Row
Do Until n >= botrow
Range("A1").Offset(n, 0).EntireRow.Insert
n = n + 6
botrow = botrow + 1
Loop
End Sub
 
If I wanted to insert 5 rows for every 1 row. How would I change the below
macro?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top