Insert 2 blank cells and Fill it down.

trillicomm

Board Regular
Joined
Feb 24, 2002
Messages
101
How do I modify this script below (belongs to BabyTiger) to transform from this:

WORD:
abash
abess
abate

to this:

WORD:
abash
abash
abash
abess
abess
abess
abate
abate
abate
----------------
Range("A2").Select
Do While Range("A2").Offset(1, 0).Value <> ""
Range("A" & Range("A2").End(xlDown).Row & ":A" & Range("A2").End(xlDown).Row + 1).Insert Shift:=xlDown
Loop

----------------
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
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
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

(as per other thread.)
 
Upvote 0
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
.Resize(, 2).Copy .Offset(c, 0).Resize(c + c, 2)
Rows("1:" & c * 3).Sort Key1:=Range("A1")
.EntireColumn.Delete
End With

(As per other thread)
 
Upvote 0
Just by way of mote :-

Whether you use a macro that uses a loop (like BabyTiger's) or a macro that avoids a loop (like mine) depends upon how much data you have to be processed and how important the process time is.

With 3000 lines of data, BabyToger's macro takes 34 seconds to run; the run time for the macro without a loop is not recordable (less than 1 second).
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,194
Members
448,554
Latest member
Gleisner2

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