View Single Post
  #8   Report Post  
Bob Phillips
 
Posts: n/a
Default

Sam,

My formula works whether they are adjacent or not, so you should not get a
zero, and also works if the 73 is before the 72, whereas Bernie's expects
72,73 strictly in order, strictly adjacent..

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sam via OfficeKB.com" wrote in message
...
Hi Bob,

Please ignore my previous reply to you. All is clear now.

Missed your link to Bernie's Post -

"If the numbers could appear randomly throughout the row, then another
solution whould be required".

Here is such a solution

=SUMPRODUCT(--((COUNTIF(INDIRECT("B"&ROW(numbers)&":G"&ROW(numbe rs)),72)0)
*(COUNTIF(INDIRECT("B"&ROW(numbers)&":G"&ROW(numbe rs)),73)0)))

Thanks
Sam

--
Message posted via http://www.officekb.com