View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Count if in different coulme

Do you want to count the below example as 2 or 1?

1 aa 11 12 11


If the above would be counted as 2:

=SUMPRODUCT((A1:A4="aa")*(B1:D4=11))

If the above would be counted as 1:

=SUMPRODUCT(--(A1:A4="aa"),--(MMULT(--(B1:D4=11),{1;1;1})0))

Biff

"osaka78" wrote in message
...
i have the following data
A B C D
1 aa 11 12 15
2 bb 15 18 20
3 aa 11 19 20
4 aa 12 20 21

how can i count how many times (aa & 11) togather in the array a1:d4 ?