Excel - Counting the number of times a character occurs in a cell

Asked By exceluser on 31-Aug-10 03:51 AM
How can you count the number of times a character occurs in a single
cell ?

For example, A1 contains the text:

abc,def,ghi

If you were counting the number of times the comma character occurred
in A1, the correct answer is 2.




exceluser replied to exceluser on 31-Aug-10 04:05 AM
Never mind.

I figured it out.

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




Exceluser