hello
in a round robin match up to avoid certain match up i did that :
it work for certain but since i add this one :
it give me an error is it because the number have an H to it ?
Thanks
in a round robin match up to avoid certain match up i did that :
VBA Code:
Set rng = Range("B5:F700")
With rng
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(COUNTIF($B5:$F5,54)>0,COUNTIF($B5:$F5,9)>0)"
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = RGB(0, 128, 0)
.TintAndShade = 0
End With
.FormatConditions(1).StopIfTrue = False
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(COUNTIF($B5:$F5,3)>0,COUNTIF($B5:$F5,9)>0)"
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = RGB(0, 128, 0)
.TintAndShade = 0
End With
.FormatConditions(1).StopIfTrue = False
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(COUNTIF($B5:$F5,5)>0,COUNTIF($B5:$F5,6)>0)"
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = RGB(0, 128, 0)
.TintAndShade = 0
End With
.FormatConditions(1).StopIfTrue = False
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(COUNTIF($B5:$G5,8)>0,COUNTIF($B5:$G5,10)>0)"
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = RGB(0, 128, 0)
.TintAndShade = 0
End With
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(COUNTIF($B5:$F5,8)>0,COUNTIF($B5:$F5,10H)>0)"
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = RGB(0, 128, 0)
.TintAndShade = 0
End With
.FormatConditions(1).StopIfTrue = False
End With
End Sub
it work for certain but since i add this one :
VBA Code:
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(COUNTIF($B5:$F5,8)>0,COUNTIF($B5:$F5,10H)>0)"
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = RGB(0, 128, 0)
.TintAndShade = 0
End With
it give me an error is it because the number have an H to it ?
Thanks