How do I add a line every 3 lines in a 5600 line spreadsheet?

  • Thread starter Thread starter Karen Rosenberger
  • Start date Start date
K

Karen Rosenberger

I need to insert 2 blank lines between each line of data of a spreadsheet
that is approximately 5600 lines long. Any suggestions?
 
in a spare column number the lines. Then Copy the contents of those
cells into the cells below in that column twice. Now sort your
spreadsheet on that column
 
Your description is at odds with your subject line so I'll assume
description is correct.

Sub InsertRows()
Application.ScreenUpdating = False
Dim NumRows As Integer
Dim lrow As Long
Dim r As Long
lrow = Cells(Rows.Count, 1).End(xlUp).Row
NumRows = 2
For r = lrow To 1 Step -1
ActiveSheet.Rows(r + 1).Resize(NumRows).EntireRow.Insert
Next r
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Thu, 24 Sep 2009 11:45:01 -0700, Karen Rosenberger <Karen
 
Back
Top