Selection EntireRow Insert

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

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
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top