Insert Rows in b/w

  • Thread starter Thread starter Ranjit kurian
  • Start date Start date
R

Ranjit kurian

Hi

I have a column with few number, i need a macro code which will insert 4
rows after every number

example:
Amount
1
2
3
4
5
Answer:
1



2



3



4
 
Sub Macro1()
For irow = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1
For k = 1 To 4
Cells(irow, "A").EntireRow.Insert
Next k
Next irow
End Sub

best wishes
 
This code is working fine,Thanks for it.
Could you please explain me the 'irow' concept
 
try this
Sub insertrows()
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
Rows(i).Resize(4).Insert
Next i
End Sub
 
Back
Top