Simple AutoFill
![]()
Sub Updatemonths() Dim x As Long With Worksheets("Sheet1").Cells(4, 4).Resize(, 2) .Cells(2).Value = DateAdd("m", 1, .Cells(1).Value) x = DateDiff("m", .Cells(1).Value, DateAdd("m", 2, Date) - Day(Date) + 1) .AutoFill .Resize(, x + 1) End With End Sub
Bookmarks