Forum Discussion
torircase
Mar 04, 2023Copper Contributor
Countif using specific criteria
I am using the CountIF formula to count how many times a name appears across several sheets (all within the same workbook). But I need to separate each name into two different categories. So, every t...
HansVogelaar
Mar 04, 2023MVP
Excel treats * as a wildcard; it stands for 'any number of characters (including 0)'.
If you use "*Jones" as criteria in a COUNTIF formula, Excel includes all cells whose value ends in "Jones":
Jones
The Jones
A Jones
*Jones
So * is not suitable to distinguish the two categories. Use another character, e.g. | or !
(Avoid ? since it is a wildcard character too, and =, + and - as well since they start a formula.)