Sub ClearWarningMarks(rng as Range)
'Description: Clears interior coloring and comments
' filtered by color constants
Dim tempCell as Variant
If rng Is Nothing Then Exit Sub
For Each tempCell In rng
With tempCell
'Clear interior color if FILTER Color found
If .Interior.Color = WARNING_BACKCOLOR Then
'it's a warning coloring
With .Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
'delete comment if FILTER Color found
If Not .Comment Is Nothing Then
'there is a comment in the cell
If .Comment.Shape.Fill.ForeColor.RGB = WARNING_COMMENTCOLOR Then
'it's a warning comment
.ClearComments
End If
End If
End With
Next tempCell
End Sub