inserting rows automatically?

  • Thread starter Thread starter elaine216
  • Start date Start date
E

elaine216

hi,

Does any one know how to insert X number of rows after each rows?

ie, want to insert 5 rows after row 1,another 10 rows after row 2...?

eg. row 1: holiday inn
row2: hyatt
row3: ritz

and i want to insert 5 rows after row 1, another 5 after row 2 etc, so
that i can write down places names that have those hotels in the new
rows:

row1:holiday inn
hk
uk
us
japan
norway
row6:hyatt
uk
hawaii
.... etc.

How can you do it?

Please help!
Elaine
 
this should put a smile on your face
Sub insert5rows()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1
Rows(i).Resize(5).Insert
Next
End Sub
 

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