View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Sumproduct (I think?)

One way

=SUMPRODUCT(--(A1:A100-B1:B100=1),--(A1:A100=6))


Regards,

Peo Sjoblom


"Sandy" wrote in message
...
I have two ranges A1:A100, B1:B100 each containing single digit numbers
typically between 3 and 8. (No blank cells.
I would like to count all the instances of each time row B contains a
number one less than that in the equivalent A cell. eg if A5 contains 6
and B5 contains 5 then that would count as one instance. The pairs have to
be the same numbers. further eg A10 containing 6 and B10 containing 5
would count as a second instance but A12 containing 7 and B12 containing 6
would not. Am I making sense?
TIA
Sandy