Hello. Can someone help me to understand the code below? Piece by piece.
Sub FixCF() For Each Cell In Range("A2:G6") On Error Resume Next Cell.formatcondtions(1).Delete On Error GoTo 0 Cell.Select Cell.FormatConditions.Add Type:=xlExpression, _ Formula1:="=B2=5" Cell.FormatConditions(1).SetFirstPriority With Cell.FormatConditions(1).Interior .PatternColorIndex = xlAutomatic .Color = 65535 .TintAndShade = 0 End With Cell.FormatConditions(1).StopIfTrue = False Next Cell End Sub
Bookmarks