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
 
T

Toppers

A1=AAA_BBB_CCC_DDD then in B1:

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

Replace "_" with required character

HTH
 
Top