=COUNTIF off by 1 in total?
If there is one or no entries, it returns 0. If there are 2, it returns 1.
Is this a base 0 formula that I need to manually increment by 1?
Badunit wrote:
Redress is not a match. It would be a match to red with stars on each side.
Jon Canfield wrote:
Thanks for the replies. I do understand the wildcards and exact matching. I have 3 different items"
The sky is red
see the red tree
the sky is blue
adding an additional cell:
the sky is blue
The formula =COUNTIF(B1::B10,"blue") would return a value of 1 only if there was a cell in the range that contains only the word blue - it won't use a partial string, which is why I went with the * wildcard. I also don't know where in the string the word will be, so I can't use the ? or follow the word with a wildcard because it may be in the middle or end of a string.
Jon Canfield wrote:
Barry -
Adding a space or removing one after the search word or red or blue does not change the results. If I change the formula to =COUNTIF(B1::B10,"*red "), it then returns 0 regardless of the presence of a space after the word red.
The formula =COUNTIF(B1::B10,"blue") would return a value of 1 only if there was a cell in the range that contains only the word blue - it won't use a partial string, which is why I went with the * wildcard. I also don't know where in the string the word will be, so I can't use the ? or follow the word with a wildcard because it may be in the middle or end of a string.
=COUNTIF off by 1 in total?