Sub Test()
Dim iLastRow As Long
Dim i As Long
iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
iLastRow = iLastRow - (iLastRow Mod 2 = 0)
For i = iLastRow To 2 Step -2
Rows(i).Resize(2).Insert
Next i
End Sub
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"andresg1975" <(E-Mail Removed)> wrote in message
news:73A2433A-0915-49D9-B40A-(E-Mail Removed)...
> how can i create a macro that selects, lets say column h, inserts two rows
> every two rows.
>
> column h
>
> row 6 254
> row 7 -254
> row 8 450
> row 9 -450
>
> final result should be:
>
> column h
>
> row 6 254
> row 7 -254
> inserted row
> inserted row
> row 8 450
> row 9 -450
> inserted row
> inserted row
>
> and so on,
>
> thanks a lot for your help
|