excelquestion123
New Member
- Joined
- May 25, 2008
- Messages
- 23
i need to insert a blank row every 3 rows.
I found the following code from a previous thread for inserting a blank row every 5 rows. Can the following code be tweaked to make it work for inserting a blank row every 3 rows.
http://www.excelforum.com/excel-mis...-quickly-insert-a-blank-row-every-5-rows.html
Sub AAA()
Dim LastRow As Long
Dim RowNdx As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowNdx = 6 To LastRow Step 6
Rows(RowNdx).Insert
Next RowNdx
End Sub
I found the following code from a previous thread for inserting a blank row every 5 rows. Can the following code be tweaked to make it work for inserting a blank row every 3 rows.
http://www.excelforum.com/excel-mis...-quickly-insert-a-blank-row-every-5-rows.html
Sub AAA()
Dim LastRow As Long
Dim RowNdx As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowNdx = 6 To LastRow Step 6
Rows(RowNdx).Insert
Next RowNdx
End Sub