View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
RichardSchollar RichardSchollar is offline
external usenet poster
 
Posts: 196
Default countif with double criteria

Hi Benoit

Use SUMPRODUCT:

=SUMPRODUCT(--(B2:B1000="E"),--(C2:C1000=2))

Note that I have assumed that codes E,T etc are in col B and codes
1,2,3 are in col C. Note also you can't use whole column refs, so you
will need to adjust ranges to suit (can't use B:B for example, but
B2:B50000 is OK).

Hope this helps!

Richard


Benoit wrote:
I'm trying to find a formula to count cells if they respond to 2 criteria.
For example I have a list of transactions which are coded by a list of 2
criteria. The first list of code is : E, T, M, S, O and a second list of
codes is: 1, 2, 3.

Ex:

Transaction 1 E 2
Transaction 2 T 3
Transaction 3 S 1
Transaction 4 M 2
etc.


I want to count the number of transactions which are both equal to E and 2
at the same time.

Thanks !