Inserting Blank rows between items

J

JB

How can I quickly insert 3 blank rows between a list of many items? For
example, I have the following list of items in cells a1 thru a5 and I want to
quickly insert 3 blank rows between each item, without having to do each one
at a time:

John
James
Joe
Nancy
Steve

Thanks for the help.
 
D

Don Guillett

Sub insert3rows()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 1 Step -1
Rows(i).Resize(3).Insert
Next i
End Sub
 
J

JB

Disregard my last post. I tried this as a Macro and it worked perfectly.
Thanks Mr. Guillett!
 
J

JB

Thanks Don. I'll do that. Here's another quick question: Every time I run
my new Macro you gave me, the Macro records what it's doing and changes
itself so that when I go to run it again, it adds 6 blank rows. How do I get
it to stop changing itself?
 
D

Don Guillett

The macro is not/can not change itself. It is doing what was asked. It was
designed to run once to add the desired rows. If you are saying that you
want it to add blank rows only if there is not a blank row then it would
have to be re-written.
 

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

Top