Function myFunction(rng As range, cer) Dim c As range Dim cer1 AsString cer1 = Replace(cer, "<>", "") Application.Volatile ForEach c In rng If c.Value LikeCStr(cer1) Then myFunction = myFunction + 1 Else IfNot IsError(Evaluate(c & cer1)) Then If Evaluate(c & cer1) = True
And IsNumeric(c.Value)
Then myFunction = myFunction + 1 EndIf EndIf EndIf Next If Len(cer1) <> Len(cer) Then myFunction = rng.Count - myFunction End Function