You need to clear all your comment in row 4.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range, i As Long, myDate As Date
If Target.Address(0, 0) <> "K2" Then Exit Sub
Application.EnableEvents = False
Application.ScreenUpdating = False
myDate = [k2] - Day([k2]) + 1
For Each r In Range("m5,m16, m27")
If DateAdd("m", -1, myDate) = r.Value Then
With r.CurrentRegion.Offset(1)
For i = 2 To 13
.Cells(0, i) = DateAdd("m", i - 13, myDate)
Next
.Columns(3).Resize(, 11).Copy
.Range("b1").PasteSpecial xlPasteValues
.Columns(13).ClearContents
End With
End If
Next
Target.Select
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Bookmarks