Formula to count characters with criteria

  • Thread starter Thread starter ian salmon
  • Start date Start date
I

ian salmon

I am trying to count the number of charcters in a cell
that satisfy certaijn criteria.
e.g. If cell A1 contains the following then how many 1's
exist in the cell <1111011111110011>

The answer should be 13.

Thanks in advance for any help.

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

where I assume that A1 is formatted as text then 1111011111110011 is entered
in A1.
 
I am trying to count the number of charcters in a cell
that satisfy certaijn criteria.
e.g. If cell A1 contains the following then how many 1's
exist in the cell <1111011111110011>

The answer should be 13.

Thanks in advance for any help.

ian

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


--ron
 
Back
Top