98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » advanced excel course - Inserting new rows repeatedly in a spreadsheet | Excel forum
advanced excel course - Inserting new rows repeatedly in a spreadsheet | Excel forum
Resolved · Low Priority · Version Standard
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
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Concatenating Results of FormulasTo concatenate the results of formulas simply add the "&" after the formula or function closing bracket. |