I have a long list of codes such as 008.45, etc that will need multiple lines of text to explain them. I have the list of codes and I would like to know how I can automatically insert a row every, say, fifth row. Example Below
1
2
3
4
5
6
7
8
9
10...
100
Every five rows I would like to insert a given number of my choosing of rows. How can I do this? Thanks
Test with a range from row 1 to row 100.
Sub InsertRows()
For i = Sheet1.UsedRange.Rows.Count To 1 Step -5
For j = 0 To 4
Sheet1.Rows(i).Insert
Next
Next
End Sub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With