View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default counting digits, not numbers

This will count the 1s

=SUMPRODUCT(--(LEN($A$1:$A$5)-LEN(SUBSTITUTE($A$1:$A$5,"1",""))))

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"nebb" wrote in message
...

Is there a worksheet function that will return the number of times a
digit (eg. The number 15 has a digit 1 and a digit 5) appears in a list
or array of cells.:
For example:
Cell A1 = 15
Cell A2 = 12
Cell A3 = 114
Cell A4 = 43
Cell A5 = 54
When using the array A1:A5, I would like the formula to return the fact
that digit 1 appears 4 times, the digit 2 appears 1 time, digit 3
appears 1 time, digit 4 appears 3 times and digit 5 appears 2 times.


--
nebb
------------------------------------------------------------------------
nebb's Profile:

http://www.excelforum.com/member.php...fo&userid=8981
View this thread: http://www.excelforum.com/showthread...hreadid=504230