View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
greenmachine greenmachine is offline
external usenet poster
 
Posts: 5
Default find the frequency a number appears with another number within

I wasn't very clear in my response. I was only looking at the first line of
the example data. I do want to be able to count the number of times the 2
appears next to 13 through out the range of data. The solution you provided
is what I need! Thanks for the help

"T. Valko" wrote:

if i was looking for the number of times 2 appeared next to 13;
the answer would be one.


Well, I see 4 instances of 2 followed by 13:


[2,13],1,13,2
13,[2,13],[2,13]
1,5,13,[2,13]

Have no idea how you arrive at 1.

--
Biff
Microsoft Excel MVP


"greenmachine" wrote in message
...
if i was looking for the number of times 2 appeared next to 13; the answer
would be one. If I was looking for the number of times 13 appeared next
to
2; the answer would be 4. The rest of the numbers would not be important.
I
need to search the numbers and ask how many times does this number appear
next to this number with in each set (A1:E3).

"T. Valko" wrote:

What result do you expect based on these samples:

2,13,1,13,2
13,2,13,2,13
1,5,13,2,13

If the result should be 4 with the numbers in the range A1:E3:

=SUMPRODUCT(--(A1:D3=2),--(B1:E3=13))

--
Biff
Microsoft Excel MVP


"greenmachine" wrote in message
...
each number is in an individual cell (many rows 5 columns). 2 would
have
to
be next to 13 no other number between them. I'm trying to find the
number
of
times 2 appears next to 13 within the set of numbers. Another example
would
be how many times does 1 appear next to 3. Thanks for taking the time
to
answer!