View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Count the number of appearance within a cell

A1 = St. Louis

=LEN(A1)-LEN(SUBSTITUTE(A1,{"S","s"},""))

Fails

=SUM(LEN(A1)-LEN(SUBSTITUTE(A1,{"S","s"},"")))
=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"S",""))


--
Biff
Microsoft Excel MVP


"Teethless mama" wrote in message
...
=SUM(LEN(A1)-LEN(SUBSTITUTE(A1,{"p","P"},"")))


"Lucy" wrote:

In cell A1, I put text "Apple"

How can I count the number of appearance of letter "p" within one cell?

I would like the answer come out as numeric "2"

Thanks.