Hi,
I'm trying to do a count of specific substring in a range of cells. I've been able to count for substrings in a cell using the following formula:
=COUNTIF(A1:A3,"*fox*")
However, I'm running into trouble when the substring I'm counting for exists in the same cell in another string:
A
1 foxes
2 foxes, fox
3 fox, foxes
I'd like to get a hit only if the cell contains the substring "fox" on it's own, and not a string that contains the substring, ie., "foxes". For the above, the count should be 2, but I'm getting 5. Any idea how to go about this?
Thanks!
I'm trying to do a count of specific substring in a range of cells. I've been able to count for substrings in a cell using the following formula:
=COUNTIF(A1:A3,"*fox*")
However, I'm running into trouble when the substring I'm counting for exists in the same cell in another string:
A
1 foxes
2 foxes, fox
3 fox, foxes
I'd like to get a hit only if the cell contains the substring "fox" on it's own, and not a string that contains the substring, ie., "foxes". For the above, the count should be 2, but I'm getting 5. Any idea how to go about this?
Thanks!
Last edited: