View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default find occurance of something from 2 creterion

In all Excel versions: =SUMPRODUCT(--(A1:A100="A"),--(B1:B100=2008))
Only in Excel 2007 : =SUMPRODUCT(--(A:A="A"),--(B:B=2008))
Only in Excel 2007: =COUNTIFS(A1:A100,"A",B1:B100,2008)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"liu" wrote in message
...
If I have 2 columns like below:

A,2008
A,2007
C,2007
B,2008
C,2007
A,2008
A,2008
B,2008

I can use COUNTIF(A1:A8,A11) to find the total occurance of A, but how
can I add one moe creterion so I can get the result that it's A and
also 2008 (2nd column). So the answer should be 3 in the example
above.

Thanks for the help,

liu