I am using this formula but it won't stop I want to do a range of A2:A300 inserting 12 rows in between them. the sheet already has employee names so i want 12 blank rows after name.
It works but I can't stop the loop!!!!
Sub test()
Dim j As Long, r As Range
j = InputBox("type the number of rows to be insered")
Set r = Range("A2")
Do
Range(r.Offset(1, 0), r.Offset(j, 0)).EntireRow.Insert
Set r = Cells(r.Row + j + 1, 1)
MsgBox r.Address
If r.Offset(1, 0) = "" Then Exit Do
Loop
End Sub
Thanks,
Nadia
Bookmarks