Help: how to insert 2 blank cells in between the rows until

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi,

You might want to try the following:

Range("L20").Select
Do While Range("L20").Offset(1, 0).Value <> ""
Range("L" & Range("L20").End(xlDown).Row & ":L" & Range("L20").End(xlDown).Row + 1).Insert Shift:=xlDown
Loop

It is working from bottom up, and the above would only work if you data column if continuous (ie. no empty cells in between). And "L20" is where the start cell is.

And if you have data in the other cells/columns, and you want to shift whem down as well, then use:

Range("L" & Range("L20").End(xlDown).Row & ":L" & Range("L20").End(xlDown).Row + 1).EntireRow.Insert

instead of the line above.

Hope it helps
 
Upvote 0
Alternatively :-

Dim rng As Range, c As Long
Application.ScreenUpdating = False
Columns(1).Insert
Set rng = Range([B1], [B65536].End(xlUp)).Offset(0, -1)
c = rng.Cells.Count
With rng
.Cells(1, 1).Value = 1
.Cells(1, 1).AutoFill Destination:=rng, Type:=xlFillSeries
.Copy .Offset(c, 0).Resize(c + c, 1)
Rows("1:" & c * 3).Sort Key1:=Range("A1")
.EntireColumn.Delete
End With
This message was edited by Abdc on 2002-03-21 16:25
 
Upvote 0
Try the following, and see where that's what you need:

Range("A2").Select
Row_Numb = Range("A2").End(xlDown).Row
For i = Row_Numb To 2 Step -1
Rows(i).Copy
Rows(i & ":" & i + 1).Insert shift:=xlDown
Next i
 
Upvote 0

Forum statistics

Threads
1,213,506
Messages
6,114,025
Members
448,543
Latest member
MartinLarkin

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