Why this code is not working ?, i mean the "for loop"
it doesn't like the "count if"
Application.Goto Reference:="R11C16:R10000C16"
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=COUNTIF(Code,P11)=0"
Selection.FormatConditions(Selection.FormatConditions.count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Dim N As Long, i As Long
i = 0
For N = 11 To 21
If countif(Cells(N, 16).Text) = "" Then
i = i + 1
Exit For
Else
End If
Next N
If i > 0 Then
MsgBox ("Hello")
End If
Range("P11").Select
End Sub