Hey,
I've got a list of about 62,000 values and I need to copy and add them to a row beneath. This needs to be done 15 times for each value.
I've achieved this with the code below, but at a rough estimation it will take about 8 or 9 hours to complete. I'm just wondering if there is a quicker and more efficient way to do it by any chance?
Sub test()
' Get last row
intLastRow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
' Loop till last row
intRow = 0
For Each strColAValue In ActiveSheet.Range("A1:A" & intLastRow).Value
intRow = intRow + 1
' If found year, insert row below
If InStr((strColAValue), "") > 0 Then
Range("A" & intRow + 1).Select
For I = 1 To 15
Selection.EntireRow.Insert
Selection.FormulaR1C1 = "=REPT(R[-1]C,1)"
intRow = intRow + 1
Next I
End If
Next
End Sub
Thanks for the help!
Josh.
Bookmarks