Inserting Rows

  • Thread starter Thread starter chainsaw
  • Start date Start date
C

chainsaw

I have a file that has 3,000 rows of data. I am needing to add two (2
blank rows between each row of existing data. Is there any way to d
this without having to right click on each individual row and an
select insert
 
I hate blank rows in my data--it makes sorting, pivottables, filters, charts a
little more difficult.

I'd just change the rowheight to make it look like it's triple spaced.

But if you really want:

Option Explicit
Sub testme()

Dim iRow As Long
Dim FirstRow As Long
Dim LastRow As Long

With Worksheets("sheet1")
FirstRow = 1
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

For iRow = LastRow To FirstRow Step -1
.Rows(iRow).Resize(2).Insert
Next iRow
End With

End Sub
 

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

Back
Top