How do I insert a row of blank cells?

G

Guest

I need to know how to insert a row of blank cells every other row in the
columns from F to I ONLY!!! I currently have just a straight set of data in
those columns like data-data-data-data-data-data. I need to have it
alternate data-blankrow-data-blankrow-data-blankrow- as I go down from row to
row. I need to do this for about 1000 rows so I need a quick way to do it if
there is one. HELP!!!

Looks like this:

Data
Data
Data
Data

I want this:

Data

Data

Data

Data

Thanks.

Chris
 
C

crispbd

-open the VB editor
-double click the sheet of interest
-View from the menu--> Code
-Paste the below code, then run the 'InsertBlankRows' macro

* this assumes that all rows have data, it will stop if it finds a
blank value
(it uses F to I Columns)

Sub InsertBlankRows()
Dim Interval As Long
Dim Counter As Long
Interval = 2:StartRow = 2:Counter = StartRow
Do While Cells(Counter, 6).Value <> ""
Range(Cells(Counter, 6), Cells(Counter, 9)).Select
Selection.Insert Shift:=xlDown
Counter = Counter + 2
Loop
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

Top