My situation: Newly installed Excel.
Table:
A | BS
A | SDC
A | BS f
A | BS c
B | SDC
B | TIP
B | SDC
C | BS s
C | SDC
D | BS a
E | SDC

My need: I need to count all the BS* ones.
My formula: =COUNTIF(B1:B11; "BS*")
The result shows 0. Always. I have tried with other tables.
=COUNTIF(B1:B11; "BS") returns 1 of course.
But I need BS*
I have tried other wildcards in other situations. And none are working. Do I have to turn something on in Excel first?
Hope you can help
From the Microsoft page on COUNTIF:
Make sure your data doesn't contain erroneous characters.
When counting text values, make sure the data doesn't contain leading spaces, trailing spaces, inconsistent use of straight and curly quotation marks, or nonprinting characters. In these cases, COUNTIF might return an unexpected value.
I recreated your error by copying your values from the question, but when I took out the leading spaces using (TRIM) it gave the right results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With