View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Count a number in a range with cells containing more than one

So still I believe the same number can repeat in a cell; right?

The OP didn't mention that possibility but it doesn't matter.

1,1,2

You can just look for the individual digit 1. You don't have to be concerned
with numbers like 11, 13, 21 or 101

By the way who is 'Tracey'?


I have no idea.

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
Thanks Biff.

I missed the 1-8; which was there in my mind before typing in the formula.
So still I believe the same number can repeat in a cell; right?

By the way who is 'Tracey'?

If this post helps click Yes
---------------
Jacob Skaria


"T. Valko" wrote:

Numbers are 1 to 8.


Since there won't be any combinations of numbers all you need to do is
look
for the individual digits.

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
Try the below formula
1. Should be Comma separator
2. Number to be searched in cell B1
3. A1:A10 is the range to be searched...

=(SUMPRODUCT(LEN(","&SUBSTITUTE(A1:A10,",",",,")&" ,"))-SUMPRODUCT(LEN(SUBSTITUTE(","&SUBSTITUTE(A1:A10,", ",",,")&",",","&B1&",",""))))/(LEN(B1)+2)

If this post helps click Yes
---------------
Jacob Skaria


"Vermont Pete C" wrote:

I've got a range (one column) where each cell either
- has no value or number in it (empty cell)
- has 1 or more values in it (and I can separate by , ; - / or any
other
symbol. )

Cells only have numbers, no text. Numbers are 1 to 8.

I would like to know how many occurances of each number happen in that
range.
Using count function does not work clearly (or any other count
function).

For instance:
A1: 1,5
A2:
A3: 8
A4: 2,4,6,7,
etc...

Anyone knows if there is an existing function within excel or needs to
be
macro (not my forté)?

Many thanks to the this community...

Peter C.