View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Pierre Archambault Pierre Archambault is offline
external usenet poster
 
Posts: 35
Default Matrix formula ? Second try (no image)

Thank you very much.

This solution is really what I was looking for.


"Harlan Grove" a écrit dans le message de
...
"Pierre Archambault" wrote...
...
I need to count in C1:I1 range, the number of times a given number
appears next to a "1" in the two

columns A1:B14

...

If B1:B14 would only contain zeros or ones, either

=SUMPRODUCT(SUMIF(A1:A14,C1:I1,B1:B14))

or

=SUMPRODUCT(COUNTIF(C1:I1,A1:A14),B1:B14)

Unlike LOOKUP-based formulas, if there were duplicate values in A1:A14,

the
formulas above would count multiple times. That may be good or bad.