View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Count occurrences of text within a cell

If you only use one cell then this will suffice

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

you probably meant


=SUMPRODUCT(LEN(A1:A10)-LEN(SUBSTITUTE(UPPER(A1:A10),"E","")))



--
Regards,

Peo Sjoblom



"T. Valko" wrote in message
...
Try this:

=SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"E","")))

--
Biff
Microsoft Excel MVP


"Stan Sitek" wrote in message
...
I need to count the number of characters repeating within a cell. For
example, assuming the following in range A1 through A4:

eee
ee
aaaae
af

A count of "e" would return

3
2
1
0