#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default sumproduct

I need to count the number of times column H is greater than 0, when column C
= jw, wh, br or sm. Can't seem to work it out.


  #2   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default sumproduct

one possibility
=sumproduct(--(H1:H1000O1:O1000),--or(C1:C1000="jw",C1:C1000="wh",C1:C1000="br",C1:C1 000="sm"))


"Harley" wrote:

I need to count the number of times column H is greater than 0, when column C
= jw, wh, br or sm. Can't seem to work it out.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default sumproduct

Hi

Try
=SUMPRODUCT(--(H1:H10000),--(C1:C1000={"jw,"wh","br","sm"}))

Note you cannot use whole column references in Sumproduct.
Adjust range to suit.
--
Regards
Roger Govier



"Harley" wrote in message
...
I need to count the number of times column H is greater than 0, when column
C
= jw, wh, br or sm. Can't seem to work it out.




  #4   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default sumproduct

even after adding the second quote mark around jw, (you are starting to type
like I do) I still get an #value error using your equation
I can do either section and get an answer, but not in the format you have it.
when I use
=SUMPRODUCT((H1:H10020)*(C1:C1002={"jw","wh","br" ,"sm"})),
which should be identical, I get the right answer
I have 2003
does anyone else have this problem?


"Roger Govier" wrote:

Hi

Try
=SUMPRODUCT(--(H1:H10000),--(C1:C1000={"jw,"wh","br","sm"}))

Note you cannot use whole column references in Sumproduct.
Adjust range to suit.
--
Regards
Roger Govier



"Harley" wrote in message
...
I need to count the number of times column H is greater than 0, when column
C
= jw, wh, br or sm. Can't seem to work it out.





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default sumproduct

Hi

Sorry about the missing quotes.
Yes, this is one of those occasions where using * rather than -- and ,
works, and not vice versa.
I think it is because the coercion from True/False to 1/0 only takes place
when the terms are multiplied, as opposed to the coercion taking place on
each term through the double unary minus, before the sumproduct calculation
occurs.

This is consistent through all versions of Excel.

--
Regards
Roger Govier



"bj" wrote in message
...
even after adding the second quote mark around jw, (you are starting to
type
like I do) I still get an #value error using your equation
I can do either section and get an answer, but not in the format you have
it.
when I use
=SUMPRODUCT((H1:H10020)*(C1:C1002={"jw","wh","br" ,"sm"})),
which should be identical, I get the right answer
I have 2003
does anyone else have this problem?


"Roger Govier" wrote:

Hi

Try
=SUMPRODUCT(--(H1:H10000),--(C1:C1000={"jw,"wh","br","sm"}))

Note you cannot use whole column references in Sumproduct.
Adjust range to suit.
--
Regards
Roger Govier



"Harley" wrote in message
...
I need to count the number of times column H is greater than 0, when
column
C
= jw, wh, br or sm. Can't seem to work it out.







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? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM
sumproduct RGlade Excel Discussion (Misc queries) 2 December 8th 06 09:41 PM
Help with SUMPRODUCT FrankTimJr Excel Discussion (Misc queries) 4 October 12th 05 04:27 PM
Sumproduct? cjjoo Excel Worksheet Functions 9 October 11th 05 12:31 PM
sumproduct? cursednomore Excel Worksheet Functions 2 October 10th 05 08:45 PM


All times are GMT +1. The time now is 01:03 PM.

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

About Us

"It's about Microsoft Excel"