Countif With Multiple OR Criteria

You could use the VBA equivalent of a standard COUNTIF formula (which can take more than one argument). This can be expanded as required Standard Formula =SUM(COUNTIF(A:A, {“SAL”,”PRE”})) VBA Equivalent MsgBox Evaluate(“Sum(COUNTIF(A:A,{“”PRE””,””SAL””}))”)

What does — do in Excel formulas?

The double-dash is known as a double unary operator. Try this link: Why use — in SUMPRODUCT formulae Specifically: SUMPRODUCT() ignores non-numeric entries. A comparison returns a boolean (TRUE/FALSE) value, which is non-numeric. XL automatically coerces boolean values to numeric values (1/0, respectively) in arithmetic operations (e.g., TRUE + 0 = 1). The most efficient … Read more