Option Explicit
Sub make_selection_to_add_blank_rows()
'Erik Van Geit
'060630
Dim tmp As Range
Dim rng As Range
Dim FR As Long 'First Row
Dim LR As Long 'Last Row
Dim CR As Long 'Count Rows
Dim NR As Integer '# rows to insert
On Error Resume Next
Set tmp = Application.InputBox(prompt:="Select the range where you want to insert rows", _
Title:="SELECTION", Default:=Selection.Address, Type:=8)
On Error GoTo 0
If tmp Is Nothing Then Exit Sub
FR = tmp(1).Row
CR = tmp.Rows.Count
LR = FR + CR - 1
NR = Application.InputBox("Please enter the number of rows to insert", "# ROWS", Type:=1)
If NR = False Then
MsgBox "No rows will be inserted", 48, "Operation aborted"
Exit Sub
End If
Application.ScreenUpdating = False
Columns(1).Insert
Set rng = Range(Cells(FR, 1), Cells(LR, 1))
With rng
Cells(FR, 1) = 1
.DataSeries Rowcol:=xlColumns, Type:=xlLinear, Step:=1
Rows(LR + 1 & ":" & LR + NR * CR).Insert Shift:=xlDown
.Copy .Offset(CR, 0).Resize(CR * NR, 1)
.Resize(CR * (NR + 1)).EntireRow.Sort Key1:=Cells(FR, 1), Order1:=xlAscending, Header:=xlNo
.EntireColumn.Delete
End With
Application.ScreenUpdating = True
End Sub