Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting rows
Varable iR is the row where I need to insert a row.
Given iCount is the numbers of rows to be inserted, how can this be altered to insert that number of rows? Sheets("Pages").Rows(iR + 1).EntireRow.Insert The following does it but is so cumbersome, having to select first: Cells(iR+ 2, 1).Select ActiveCell.Rows("1:" & iCount).EntireRow.Select Selection.Insert Shift:=xlDown Many thanks Francis Hookham |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting rows
Doing this wil speed up the insertion because is not selecting:
Cells(ir + 2, 1).Rows("1:" & icount).EntireRow.Insert Shift:=xlDown -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Francis Hookham" wrote: Varable iR is the row where I need to insert a row. Given iCount is the numbers of rows to be inserted, how can this be altered to insert that number of rows? Sheets("Pages").Rows(iR + 1).EntireRow.Insert The following does it but is so cumbersome, having to select first: Cells(iR+ 2, 1).Select ActiveCell.Rows("1:" & iCount).EntireRow.Select Selection.Insert Shift:=xlDown Many thanks Francis Hookham |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting rows
Fantastic Michael - just what I wanted - many thanks,
Francis "Michael" wrote in message ... Doing this wil speed up the insertion because is not selecting: Cells(ir + 2, 1).Rows("1:" & icount).EntireRow.Insert Shift:=xlDown -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Francis Hookham" wrote: Varable iR is the row where I need to insert a row. Given iCount is the numbers of rows to be inserted, how can this be altered to insert that number of rows? Sheets("Pages").Rows(iR + 1).EntireRow.Insert The following does it but is so cumbersome, having to select first: Cells(iR+ 2, 1).Select ActiveCell.Rows("1:" & iCount).EntireRow.Select Selection.Insert Shift:=xlDown Many thanks Francis Hookham |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
inserting rows inbetween rows of data ? | Excel Discussion (Misc queries) | |||
Copying & Inserting Rows w/o Affecting other Rows Etc. | Excel Worksheet Functions | |||
Inserting Blank rows after every row upto 2500 rows | Excel Worksheet Functions | |||
Why is inserting rows throwing off my hidden rows | Excel Programming | |||
Inserting multiple rows in excel with data in consecutive rows | Excel Programming |