Countif within and if statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good morning,

I have data that I am trying to do an embedded countif statement and I can
not get it to work.

I would like to say If the date is within the month of June, count all of
the items that have XIAPPLXRP110 as the creator.

Sample data

Date Creator Order #
6/5/2007 SCHMINKN 427998
7/24/2007 SCHMINKN 427954
6/27/2007 XIAPPLXRP110 428031
7/2/2007 XIAPPLXRP110 427985
6/18/2007 PATTEEA 427947
7/8/2007 PATTEEA 427944
 
=SUMPRODUCT(--(MONTH(A2:A100)=X1),--(B2:B100=X2))

X1=6 (June) (assume all in same year)
X2=XIAPPLXRP110
 
This will do the count you want...

=SUMPRODUCT((MONTH(A1:A6)=6)*(B1:B6="XIAPPLXRP110"))

although I would probably put the 6 for the month and the "XIAPPLXRP110"
criterion in cells of their own (so you can change them) and put the cell
addresses in the formula in their place.

Rick
 
Back
Top