Maybe one of these can help:
Sub cudh()
Dim x As Long
x = ActiveSheet.UsedRange.Columns.count + 1
Cells(4, x) = Month(Date) & "/" & Right(Year(Date), 2)
Cells(4, x + 1) = Month(Date + 30) & "/" & Right(Year(Date), 2)
Cells(4, x + 2) = Month(Date + 60) & "/" & Right(Year(Date), 2)
Cells(4, "D").Copy
Range(Cells(4, x), Cells(4, x + 2)).PasteSpecial xlPasteFormats
End Sub
Or
Sub cudhzz()
Dim x As Long
Dim i As Long
Dim y As Long
x = ActiveSheet.UsedRange.Columns.count + 1
i = 1
For y = 4 To x + 2
Cells(5, y) = MonthName(i) & "/" & Right(Year(Date), 2)
i = i + 1
Next y
Cells(4, "D").Copy
Range(Cells(5, 4), Cells(5, x + 2)).PasteSpecial xlPasteFormats
End Sub
The first extends the range you already have.
The second starts from Jan-Oct. on row 5.
Bookmarks