Impossible Macro?
On Feb 25, 7:03*pm, "Don Guillett" wrote:
Try
Sub insertrowsdynamic()
fr = Selection.Rows(1).Row
'MsgBox fr
lr = Selection.Rows.Count + fr
'MsgBox lr
nr = InputBox("How many rows")
'MsgBox nr
For i = lr To fr + 1 Step -1 'nr '(lr - fr + 1)
Rows(i).Resize(nr).Insert
'MsgBox i
Next i
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"JohnHero" wrote in message
...
I'd like to be able to have a macro that wouod work like this:
1) I highlight the rows
2) When I run the macro, it will ask me how many rows I'd like to
insert.
3) It would then insert x number of rows after each highlighted cell.
Anybody able to help with this one?- Hide quoted text -
- Show quoted text -
THanks for the quick responses everyone.
|