By: Tanjima Hossain

In reply to Jorge F..

Hello Jorge.F,
Thank you so much for your suggestion. I think you might want the following code incorporating your suggested lines. Moreover, I tried to select the range through an input box which may help you select the range.

Sub Insert_Blank_Rows()
Dim rng As Range
Dim CountRow As Integer
Dim i As Integer
Dim n As Integer
Application.CutCopyMode = False
ExcelTitleId = "Exceldemy"
Set rng = Application.Selection
Set rng = Application.InputBox("Select your range", ExcelTitleId, rng.Address, Type:=8)
n = Int(InputBox("Enter the Value of n: "))
k = Int(InputBox("Enter the Number of Blank Rows: "))
CountRow = rng.EntireRow.Count
Selection(1).Activate
For i = 1 To Int(CountRow / n)
For j = 0 To k - 1
ActiveCell.Offset(n + j, 0).EntireRow.Insert
Next j
ActiveCell.Offset(n + k, 0).Select
Next i

End Sub