advanced excel course - inserting new rows repeatedly
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » advanced excel course - Inserting new rows repeatedly in a spreadsheet

advanced excel course - Inserting new rows repeatedly in a spreadsheet

resolvedResolved · Low Priority · Version Standard

replyReply Thu 11 Oct 2007, 12:34Delegate Doug said...

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?

For upcoming training course dates see: Pricing & availability

replyReply Wed 17 Oct 2007, 14:46Trainer Carlos said...

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

 

Excel tip:

Adding multiple rows in an Excel 2010 Worksheet

If you want to add more than one row to an Excel Worksheet, drag select the number or rows you want added to the spreadsheet.

Then right click on these selected rows, choose Insert from the menu, and the new rows will be added above the rows you first selected.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard