Hi
I have the following macro that adds rows between existing row values. How do i change it so that it repeats the value of the cell above the inserted row.
Eg, If A6=Nails; A7=Screws, A8= Bolts and if i insert 5 rows between each of them, i want rows A7-A11 to repeat the name Nails and A12-A17 = Screws ...and so on.
Any help will be appreciatedSub xxxx() Dim myRange As Range Dim c As Range Set myRange = Range("A6:A65536") x = InputBox("Enter Number ") '3 i = Application.WorksheetFunction.CountA(myRange) For Each c In myRange If c.Value <> "" Then Range(c.Offset(1, 0), c.Offset(x, 1)).EntireRow.Insert End If Next c End Sub
Thanks