0

I have a column, which has data like this :-

C29,C22,C345
C292,C345,C456
C456,C29,C453

Now I want to find number of occurrence of C29, and I am using this formula now:-

COUNTIF(I9:I11,"*C29*")

But it is returning 3, as it also take C292 in an account, how can I set a formula to match only C29?

Thanks

2 Answers 2

1

You can try:

enter image description here

Formula:

=SUMPRODUCT(ISNUMBER(FIND(",C29,",","&A1:A3&",")))

Or, less verbose:

=SUMPRODUCT(REGEXMATCH(A1:A3,"\bC29\b"))

Or, even less verbose:

=SUMPRODUCT(SPLIT(A1:A3,",")="C29")
Sign up to request clarification or add additional context in comments.

Comments

0

So, two options:

  1. use sum(), if() and iferror() with find() as shown down in rows 11 to 13, formula is:

    =SUM(IF(IFERROR(FIND("C29,",A11:A13,1),0)>0,1,0))

  2. if you have the room, the do Text-to-Columns and get each data element into its own cell. Then extract the numbers, either replace the C with nothing or mid() as shown. Then count the 29.

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.