Hi the below code works however I keep getting an "Overflow" error in the date column. The Dates should stop producing at the end of the adjacent column (lastrow) however the date keeps going for some reason. Please not this is only a subset of the rest of my code.
Sub TradeDump()
Dim ws As Worksheet
Dim wsp As Worksheet
Dim wsc As Worksheet
Dim i As Integer
Dim j As Integer
Dim rng As Range
Dim rnge As Range
Dim Rnger As Range
Dim ePlaceholder As Range
Dim dater As Date
Dim lastRow As Double
Dim counter As Integer
Dim howmanytrades As Integer
Dim lasthoora As Double
Dim Clearer As Range
Dim Clearer2 As Range
lastRow = ws.Cells(Rows.Count, "E").End(xlUp).Row
lasthoora = lastRow - 1
dater = wsc.Range("MonthE")
i = 1
counter = 2
howmanytrades = wsp.Range("G6", wsp.Range("G6").End(xlDown)).Rows.Count
Do Until i = lasthoora
For j = 1 To howmanytrades
If (j = lasthoora) Then Exit For
ws.Cells(counter, 4).Value = dater
counter = counter + 1
Next j
i = i + input1
dater = dater + 30
Loop
End Sub
Longinstead ofIntegersince there is no downside of doing so, and it can hold a larger number.