Hello,
My goal is to input code to add a blank row between pre-existing rows with data.
example:
A
B
C
to
A
B
C
I have found some code to do the task - on a previous thread - but I lack the knowledge and experience in how to input the code to make it work.
Could someone help me?
Thank you.
Sub InsertBlankRows()
Const Rows2Insert As Integer = 1
Dim lngCtr As Long
Dim lngRows As Long
Dim iStep As Integer
iStep = Rows2Insert + 1
lngRows = iStep * (ActiveCell.End(xlDown).Row - ActiveCell.Row)
On Error GoTo errTrap
For lngCtr = 1 To lngRows Step iStep
ActiveCell.Offset(RowOffset:=lngCtr).Resize(RowSize:=Rows2Insert).EntireRow.Insert
Next lngCtr
Exit Sub
errTrap:
MsgBox _
Title:="Incomplete Action", _
Prompt:="Cannot continue inserting rows", _
Buttons:=vbCritical + vbOKOnly
End Sub
Bookmarks