Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
FPJ FPJ is offline
external usenet poster
 
Posts: 19
Default sumproduct function

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default sumproduct function

=SUMPRODUCT(--(YEAR(A1:A20)=2007),--(MONTH(A1:A20)=2),--(B1:B20="washers"))


--
Regards,

Peo Sjoblom



"FPJ" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default sumproduct function

=SUMPRODUCT(--(month(a1:A100)=2),--(B1:B100="washers"))
Do NOT use full column with Sumproduct:
=SUMPRODUCT(--(month(A:A)=2),--(B:B="this will not work"))
Details at
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"FPJ" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default sumproduct function

=sumproduct(--(text(a1:a11,"yyyymm")="200702"),--(b1:b11="washers"))

You may want to look at data|pivottable. It's made for coming up with this kind
of summary.

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


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
FPJ FPJ is offline
external usenet poster
 
Posts: 19
Default sumproduct function

Thanks to all of you, guys. The formula worked again.

"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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumproduct function Peter Excel Discussion (Misc queries) 10 February 5th 07 11:24 AM
SUMPRODUCT with Max Function Help [email protected] Excel Worksheet Functions 5 October 3rd 06 12:57 PM
Sumproduct function? Claudia Excel Worksheet Functions 3 July 21st 06 06:08 PM
SUMIF Function Inside SUMPRODUCT Function Abdul Waheed Excel Worksheet Functions 17 September 19th 05 04:24 PM
sumproduct function Andreea Moyes via OfficeKB.com Excel Worksheet Functions 3 February 24th 05 09:00 AM


All times are GMT +1. The time now is 02:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"