Hi all,
I'm curious to know if it's possible to create a conditional formatting rule that would be applied only if a particular cell didn't have a rule already applied?
As an example, I have a range that I'm applying two separate rules.
What I'm currently working with:
I'd like to add a third rule for all cells in the range that haven't had a rule applied to be:
I'm curious to know if it's possible to create a conditional formatting rule that would be applied only if a particular cell didn't have a rule already applied?
As an example, I have a range that I'm applying two separate rules.
What I'm currently working with:
VBA Code:
With Range("P2:P" & lr1)
.FormatConditions.Add Type:=xlTextString, String:="Registered", TextOperator:=xlContains
With .FormatConditions(.FormatConditions.Count)
.Font.Bold = True
.Interior.Color = RGB(0, 153, 76)
.Font.Color = RGB(255, 255, 255)
.StopIfTrue = False
End With
.FormatConditions.Add Type:=xlTextString, String:="Expired", TextOperator:=xlContains
With .FormatConditions(.FormatConditions.Count)
.Font.Bold = True
.Interior.Color = RGB(192, 0, 0)
.Font.Color = RGB(255, 255, 255)
.StopIfTrue = False
End With
End With
VBA Code:
With .FormatConditions(.FormatConditions.Count)
.Font.Bold = True
.Interior.Color = RGB(255, 255, 0)
.Font.Color = RGB(0, 0, 0)
.StopIfTrue = False
End With