For Barrie Davidson
Posted by Paul B on October 02, 2001 3:21 PM
Barrie you posted this Marco awhile back. Would you please modify it to show a input box so the number of rows to be inserted could be put in. Thanks
Sub Insert_row()
' Written by Barrie Davidson
Dim Number_of_rows As Long
Number_of_rows = ActiveSheet.UsedRange.Rows.Count
Range("A2").Select
Do Until Selection.Row = Number_of_rows + 1
If Selection.Value <> Selection.Offset(-1, 0).Value Then
Selection.EntireRow.Insert
Number_of_rows = Number_of_rows + 1
Selection.Offset(2, 0).Select
Else
Selection.Offset(1, 0).Select
End If
Loop
End Sub