Doug has attended:
Excel Intermediate course
Excel Advanced course
Inserting new rows repeatedly in a spreadsheet
Hello,
I have created a spreadsheet with thousands of items on it. I now have to insert 2 empty rows below each existing row of data. Is there a quick way of doing this please?
RE: Inserting new rows repeatedly in a spreadsheet
Doug
To do this you need to create a macro:
1. Open Tools/ Macro/ Macros
2. Click the Edit button
In the code view area
1. Open Insert And select Module.
In the module code area (on the right) insert the following macro.
Sub InsertRows()
' Macro created 17/10/2007 by Carlos
'**In Here insert the address of the first cell to contain data in the table eg
'Range("A5").Select
ActiveCell.Offset(1, 0).Range("A1:A2").Select
Selection.EntireRow.Insert
ActiveCell.Offset(2, 0).Range("A1").Select
Do While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Range("A1:A2").Select
Selection.EntireRow.Insert
ActiveCell.Offset(2, 0).Range("A1").Select
Loop
End Sub
Hope this helps
Carlos