I have two arrays, one includes the word "complete" and the other "incomplete". when the rules are ran, incomplete is being formatted the same as complete. The VBA specifically says "xlEqual", but when I look at the rules under Conditional Formatting they show as "Cell Value end with ___", and the Stop if True is ticked. So, the way it's laid out in the rules are sort of working correctly, they just aren't stopping nor how I intended it to run. How can I change my rules so that after the "Complete" rule has ran it'll stop?
VBA Code:
Sub formatting()
myArray = Array("Complete", "Up to Date", "Yes")
For y = LBound(myArray) To UBound(myArray)
With Range(Cells(2, 13), Cells(2, 13).End(xlDown)).Offset(, 1).resize(, 6)
.FormatConditions.Add Type:=xlTextString, String:=myArray(y), TextOperator:=xlEqual
With .FormatConditions(.FormatConditions.Count)
.Interior.Color = RGB(0, 128, 0)
.font.Color = RGB(255, 255, 255)
.StopIfTrue = True
End With
End With
Next
myArray = Array("Test", "Incomplete")
For y = LBound(myArray) To UBound(myArray)
With Range(Cells(2, 13), Cells(2, 13).End(xlDown)).Offset(, 3).resize(, 2)
.FormatConditions.Add Type:=xlTextString, String:=myArray(y), TextOperator:=xlEqual
With .FormatConditions(.FormatConditions.Count)
.Interior.Color = RGB(112, 48, 160)
.font.Color = RGB(255, 255, 255)
.StopIfTrue = True
End With
End With
Next
End Sub