Try using this Worksheet_Change event procedure
![]()
Private Sub Worksheet_Change(ByVal Target As Range) Dim rCell As Range, r1 As Range, r2 As Range If Not Intersect(Target, Range("D29:AP29")) Is Nothing Then Set r1 = Range("D12:AP12") Set r2 = Range("D29:AP29") r2.ClearComments For Each rCell In r2 If rCell <> 0 Or r1.Cells(1, rCell.Column - 3) <> 0 Then rCell.AddComment ("error") Next rCell End If End Sub
Bookmarks