Looking for a macro

drozbravo

New Member
Joined
Mar 8, 2005
Messages
15
Hey guys,

I have no clue on how to run or make a macro. What I have is a roughly 287 page mailing list. Each address is 4 rows long. I am looking for a way to insert an empty row at every fourth row. I assume that macros would be the best way to do this rather than inserting one in sine my last row is 14988. Any help on this would be appreciated. I looked and found ways to insert rows and copy formulas or inserting them at every row with data, but I need something tailored to every fourth row insertion. I tried using one and adapting it to my needs but since I don't know anything about coding, I found myself not where I needed to be and nothing would happen. I need to be able to start it at a specific point also so I dont go over what I have manually done up to this point.


Thanks in advance
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
So your code looks like this right now and it's not working:?
Code:
Sub insertLines()
    Application.ScreenUpdating = False
    i = 1720
    While (Not Cells(i + 5, 1) = "")
        i = i + 5
        Rows(i).Insert Shift:=xlDown
    Wend
End Sub
 
Upvote 0
with the exception of changing the line start to 2361, yes. and that time it worked. Thanks man. Nothing changed but it finally worked.
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,388
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top