View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Count one character in a string across a range of cells?

Hi,

In 2007 you could use

=SUMPRODUCT(LEN(A:A)-LEN(SUBSTITUTE(A:A,"a",)))

or in all versions:

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

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Andrea" wrote:

I have a column of cells containing strings of numbers and letters. I'm
trying to count the occurrence of individual numbers and letters. What
function should I use?