Count values with conditions

G

Guest

try this one:
=COUNT(IF((date>=A2:A20)*(B2:B20="John")*(C2:C20="smith"),1))
change date to which date you want.
Example for April month:
=COUNT(IF((A2:A20>=DATEVALUE("4/1/2006"))*(A2:A20<=DATEVALUE("4/30/2006"))*(B2:B20="john")*(C2:C20="smith"),1))

Note: this is Array function, so once you entered function to purticular
cell, press Ctrl+Shift+Enter key
 
G

Guest

Try:

=SUMPRODUCT(--(B2:B100="John"),--(C2:C100="Smith"),--(Month(A2:A100)=4))

The "John" , "Smith" and "4" (April) can be cell references.

=SUMPRODUCT(--(B2:B100)X1),--(C2:C100=X2),--(Month(A2:A100)=X3))

I received an error when trying to view your 2.jpg file so I was unable to
see your report format.

HTH
 
B

Bob Phillips

=SUMPRODUCT(--(MONTH(A2:A20)=4),--(B2:B20="John"),--(C2:C20="Smith"))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top