sumproduct function
one way:
=SUMPRODUCT(--(B2:B100="washers"),--(MONTH(A2:A100)=2),--(YEAR(A2:A100)=2007))
I recommend you put "washers" in a cell rather than hard code it.
=SUMPRODUCT(--(B2:B100=H2),--(MONTH(A2:A100)=2),--(YEAR(A2:A100)=2007))
H2 contains "washers"
HTH
"FPJ" wrote:
On the table below, I want to count how many times did we purchase washers in
February of 2007. How can I write this in SUMPRODUCT FUNCTION? Please help.
Thanks.
A B
1 1/04/05 nails
2 1/23/05 screws
3 4/05/05 screws
4 2/22/06 washers
5 6/25/06 nails
6 8/03/06 washers
7 2/15/07 washers
8 2/21/07 washers
9 2/26/07 nails
10 4/21/07 washers
11 5/04/07 washers
fpj
|