Auto insert blank rows

G

Guest

Hi

I have to repetitively handle a file with a list of reference numbers in
column A. The number of rows varies each time the task is carried out. The
rows are a continuous list. It is necessary to insert a blank line between
each row containing an entry. Could anyone provide a macro which establishes
how many rows there are in the list and then automatically inserts a blank
row between each entry?

Thank you for any assistance.

G
 
M

merjet

Sub InsertRows_()
Dim iEnd As Long
Dim iRow As Long

iEnd = Range("A1").CurrentRegion.Rows.Count
For iRow = iEnd To 1 Step -1
Rows(iRow + 1).Insert xlShiftDown
Next iRow
End Sub

Merjet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top