MrExcel Publishing
Your One Stop for Excel Tips & Solutions


Posted by HARISH on November 30, 2000 11:53 AM

I have a edit each week spreadsheet,and insert 10
blank rows.i have spreadsheet that might have some time more than 100 rows in it. i like to add 10 rows
after each data row. for example
row 1 has 'customer','ppn','press'.....etc
row 2 has 'customer','ppn','press'......etc

i like add 10 rows after first rows every week.
Is it any way i can do without inserting rows manually.


Posted by Celia on November 30, 2000 7:04 PM

If you mean that you want to insert 10 rows between every row of data (and there are no blank rows or header rows):-

Sub InsertRows()
Dim x%
x = ActiveSheet.UsedRange.Cells(2, 1).Row
Application.ScreenUpdating = False
Do Until Application.CountA(Rows(x)) = 0
Rows(x & ":" & x + 9).Insert Shift:=xlDown
x = x + 11
End Sub

Or do you mean that you want to insert 10 rows only between the first and second rows?