Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection EntireRow Insert
Using Excel 2000.
I need to insert a number of rows and using the following code seems wrong insomuch that the code is repeated for the number of rows required, is there a more simple solution? Selection.EntireRow.Insert Selection.EntireRow.Insert Selection.EntireRow.Insert Thanks, Rob |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection EntireRow Insert
Maybe
Sub stance() response = InputBox("How many rows to insert") On Error GoTo enditall For x = 1 To response Selection.EntireRow.Insert Next enditall: End Sub Mike "Rob" wrote: Using Excel 2000. I need to insert a number of rows and using the following code seems wrong insomuch that the code is repeated for the number of rows required, is there a more simple solution? Selection.EntireRow.Insert Selection.EntireRow.Insert Selection.EntireRow.Insert Thanks, Rob |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection EntireRow Insert
This will insert multiple rows at once.
Rows("5:7").Insert Shift:=xlDown You can work with it to better suit what you want. Hth, Merjet |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection EntireRow Insert
activecell.Resize(5, 1).EntireRow.Insert
Would insert 5 rows. Rob wrote: Using Excel 2000. I need to insert a number of rows and using the following code seems wrong insomuch that the code is repeated for the number of rows required, is there a more simple solution? Selection.EntireRow.Insert Selection.EntireRow.Insert Selection.EntireRow.Insert Thanks, Rob -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection EntireRow Insert
Thanks for the recommendations, have used Dave's as it best fitted my needs.
Like the idea of looping and will use this for another routine. Regards, Rob "Dave Peterson" wrote in message ... activecell.Resize(5, 1).EntireRow.Insert Would insert 5 rows. Rob wrote: Using Excel 2000. I need to insert a number of rows and using the following code seems wrong insomuch that the code is repeated for the number of rows required, is there a more simple solution? Selection.EntireRow.Insert Selection.EntireRow.Insert Selection.EntireRow.Insert Thanks, Rob -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selection copy and insert to other sheet (Macro) | Excel Discussion (Misc queries) | |||
Selection copy and insert to other sheet | Excel Discussion (Misc queries) | |||
Insert Row Selection | Excel Worksheet Functions | |||
Excel hangs on 'shtA.Cells(person_row, 1).EntireRow.Insert' comman | Excel Programming | |||
Insert Picture from dropdown selection | New Users to Excel |