Count within a cell

P

presuming ed

Is there any way of performing a count on an individual cell to identif
the number of occurances of a specified character within that cell?

e.g. Cell contains AAA_BBB_CCC_DDD

I would like the number of underscores (3) to be returned and thi
value placed in a new cell?

Thank
 
G

Guest

A1=AAA_BBB_CCC_DDD then in B1:

=LEN(A1)-LEN(SUBSTITUTE(A1,"_",""))

Replace "_" with required character

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top