View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Macro to insert rows evry other time

Try this:-

Sub Inserteveryother()
Set rng1 = Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column).End(xlUp))
col = ActiveCell.Column
For i = rng1(rng1.Rows.Count).row To rng1(1).row + 1 Step -1
Cells(i, col).Insert Shift:=xlDown
Next i
End Sub

Select the top cell of a column that has your data in and run this.

Mike

"JoiSim" wrote:

Hi!
I have a large database in Excel and I need to insert a row every other
time. When I record a macro in the normal way (by recording what I do) and
then run it, the macro always return to the rows I selected when I recorded
the macro and insert the rows there.

I need the macro to continue to the end of the database selecting every
other row without specifiing which row it is.

Can anyone out there help me with this as fast as possible?

Many thanks