Good Evening. I am working on a project where I need to tally the number of times "31" appears in a cell. An example of my cell data is as follows.
Column C
31\31\7\6\31\31 [1]
31\5\1\6\31\31 [21]
31\31\7\6\31\31 [658]
31\31\5\6\31\16 [1731]
The formula I have created to count the occurrences is as follows:
=(LEN(C1)-LEN(SUBSTITUTE(C1,"31","")))/2
I am sure I coded this wrong, because it would always double the actual occurrences of 31. I divided it by 2 and it worked, but I am sure there is a better way to do it.
However my main problem is what happens if "31" appears within the brackets (EXAMPLE 4), as I do not want that to be a part of my calculations. What modification to my formula would enable me to ignore the values within brackets. I appreciate any help that could be given. Thank you for reading.
Bookmarks