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

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

Post by S2FyZW4gUm » Sat, 26 Sep 2009 03:45:01


I need to insert 2 blank lines between each line of data of a spreadsheet
that is approximately 5600 lines long. Any suggestions?
 
 
 

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

Post by Bob » Sat, 26 Sep 2009 04:41:28

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

 
 
 

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

Post by Gord Dibbe » Sat, 26 Sep 2009 08:45:16

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