Excel - Add Lines

  • Thread starter Thread starter Kathy
  • Start date Start date
K

Kathy

I need to insert a blank line between each od a couple
thousand lines. The only way I have been able to do this
is by highlighting each line (only lets me do 9 or 10 at a
time) then right click and hit insert. Is there an easier
and faster way to do this leaving the text on the opposite
lines in tact?
 
Kathy,

Try something like the following. Change the numbers in the For statement to
the appropriate row numbers.

Sub InsertLines()
Dim RowNdx As Long
For RowNdx = 10 To 1 Step -1
Rows(RowNdx).Insert
Next RowNdx
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
-----Original Message-----
Kathy,

Try something like the following. Change the numbers in the For statement to
the appropriate row numbers.

Sub InsertLines()
Dim RowNdx As Long
For RowNdx = 10 To 1 Step -1
Rows(RowNdx).Insert
Next RowNdx
End Sub
Thank you!!!

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




.
 
Back
Top