An ugly way of getting there.
Cell A1 has the starting number
Cell A2 has the end number
Cell A3 has the increment
Column B needs to be empty (free to use)
Result in cell E2
I hope someone cleans this code up. For now it should help you.Code:Sub FillNumsBetween() Dim rRange As Range Dim rFill As Range Dim dStop As Double Dim rCell As Range Dim lr As Long Dim temparr Application.ScreenUpdating = False dStop = Cells(2, 1) '<----- End Value Set rFill = Cells(1, Columns.Count).End(xlToLeft)(1, 2) '<---- Where it starts filling results Cells(1, 1).Copy rFill Range(rFill, Cells(Rows.Count, rFill.Column)).DataSeries _ Rowcol:=xlColumns, Type:=xlLinear, _ Step:=Range("A3").Value, Stop:=dStop lr = Cells(Rows.Count, 2).End(xlUp).Row temparr = Range("B1:B" & lr) Cells(2, 5) = Join(WorksheetFunction.Transpose(temparr), "; ") Application.ScreenUpdating = True End Sub




Reply With Quote
Bookmarks