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 find the frequency a number appears with another number within

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"greenmachine" wrote in message
...
Biff , Your solution works very well and I truly appreciate the time you
took to answer my problem!

"DanGSB" wrote:

didn't see your post. Simple and neat and if you change order you get the
other sequence
--
Dan GSB
Asset Management - Rio


"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!