ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   insert multiple cells every ### rows (https://www.excelbanter.com/excel-programming/415479-insert-multiple-cells-every-rows.html)

[email protected]

insert multiple cells every ### rows
 
How do I insert multiple rows between every row in a column? I have a
column with data and I want to insert 5 rows between each row.

Don Guillett

insert multiple cells every ### rows
 
Sub insertfiverows()
For i = Cells(rows.Count, "a").End(xlUp).Row To 2 Step -1
rows(i).Resize(5).Insert
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

wrote in message
...
How do I insert multiple rows between every row in a column? I have a
column with data and I want to insert 5 rows between each row.



JLGWhiz

insert multiple cells every ### rows
 
Sub InsrtRws() 'Inserts blank rows
lastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
For i = lastRow To 2 Step -1
x = Cells(i, 1).Value
If x 0 Then
With ActiveSheet
.Range(.Cells(i, 1), .Cells(i + 4, 1)).EntireRow.Insert
End With
End If
Next
End Sub


"Don Guillett" wrote:

Sub insertfiverows()
For i = Cells(rows.Count, "a").End(xlUp).Row To 2 Step -1
rows(i).Resize(5).Insert
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

wrote in message
...
How do I insert multiple rows between every row in a column? I have a
column with data and I want to insert 5 rows between each row.





All times are GMT +1. The time now is 02:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com