Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Sumproduct not working

Read through many post. This seems to be the one I need but it is failing me.
I keep getting a sum of 0. It will work if remove all but one criteria,
anymore I get sum 0. The sum should be 6 Occurrences..................
"Wc"=2 "S"=2 "L"=1 "V"=1

What am I doing wrong?


=SUMPRODUCT(--(C4:AG4="S"),--(C4:AG4="L"),--(C4:AG4="V"),--(C4:AG4="WC"))
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 299
Default Sumproduct not working

Your formula does not calculate OR S OR L etc, it calculates AND and thus
cannot return the correct answer

try

=SUMPRODUCT(--((C4:AG4="S")+(C4:AG4="L")+(C4:AG4="V")+(C4:AG4="W C")0))

or

=SUMPRODUCT((C4:AG4="S")+(C4:AG4="L")+(C4:AG4="V") +(C4:AG4="WC"))


--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(Remove ^^ from email)


"macamarr" wrote in message
...
Read through many post. This seems to be the one I need but it is failing
me.
I keep getting a sum of 0. It will work if remove all but one criteria,
anymore I get sum 0. The sum should be 6
Occurrences..................
"Wc"=2 "S"=2 "L"=1 "V"=1

What am I doing wrong?


=SUMPRODUCT(--(C4:AG4="S"),--(C4:AG4="L"),--(C4:AG4="V"),--(C4:AG4="WC"))



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default Sumproduct not working

Hi,

You need to use the sum instead of the the sumproduct.

{=SUM(--(C4:AG4="S"),--(C4:AG4="L"),--(C4:AG4="V"),--(C4:AG4="WC"))}

The sumproduct was multiplying the answers ie (010), (100), (001) = (000)
where as the sum adds them.

Don't forget it is an array formula. {}=Ctrl+Shft+Enter
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"macamarr" wrote:

Read through many post. This seems to be the one I need but it is failing me.
I keep getting a sum of 0. It will work if remove all but one criteria,
anymore I get sum 0. The sum should be 6 Occurrences..................
"Wc"=2 "S"=2 "L"=1 "V"=1

What am I doing wrong?


=SUMPRODUCT(--(C4:AG4="S"),--(C4:AG4="L"),--(C4:AG4="V"),--(C4:AG4="WC"))

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Sumproduct not working

One mo

=sum(countif(c4:ag4,{"s","l","v","wc"}))


macamarr wrote:

Read through many post. This seems to be the one I need but it is failing me.
I keep getting a sum of 0. It will work if remove all but one criteria,
anymore I get sum 0. The sum should be 6 Occurrences..................
"Wc"=2 "S"=2 "L"=1 "V"=1

What am I doing wrong?

=SUMPRODUCT(--(C4:AG4="S"),--(C4:AG4="L"),--(C4:AG4="V"),--(C4:AG4="WC"))


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Sumproduct not working

Thank You All, works great and problem solved.

"Dave Peterson" wrote:

One mo

=sum(countif(c4:ag4,{"s","l","v","wc"}))


macamarr wrote:

Read through many post. This seems to be the one I need but it is failing me.
I keep getting a sum of 0. It will work if remove all but one criteria,
anymore I get sum 0. The sum should be 6 Occurrences..................
"Wc"=2 "S"=2 "L"=1 "V"=1

What am I doing wrong?

=SUMPRODUCT(--(C4:AG4="S"),--(C4:AG4="L"),--(C4:AG4="V"),--(C4:AG4="WC"))


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Sumproduct not working

And remember that this kind of thing will work, too:

=countif(c4:ag4,"s") + countif(c4:ag4,"l") + ....



macamarr wrote:

Thank You All, works great and problem solved.

"Dave Peterson" wrote:

One mo

=sum(countif(c4:ag4,{"s","l","v","wc"}))


macamarr wrote:

Read through many post. This seems to be the one I need but it is failing me.
I keep getting a sum of 0. It will work if remove all but one criteria,
anymore I get sum 0. The sum should be 6 Occurrences..................
"Wc"=2 "S"=2 "L"=1 "V"=1

What am I doing wrong?

=SUMPRODUCT(--(C4:AG4="S"),--(C4:AG4="L"),--(C4:AG4="V"),--(C4:AG4="WC"))


--

Dave Peterson


--

Dave Peterson
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 not working Tester Excel Worksheet Functions 10 November 26th 06 09:58 PM
Working time and days Nortos Excel Discussion (Misc queries) 1 May 6th 05 03:47 PM
Sumproduct w/date criteria not working JANA Excel Worksheet Functions 7 April 15th 05 11:19 AM
SUMPRODUCT and format problems (2) Chrism Excel Discussion (Misc queries) 2 April 5th 05 06:38 PM
Sumproduct - multiple criteria in Column A briank Excel Worksheet Functions 2 January 6th 05 06:44 PM


All times are GMT +1. The time now is 03:15 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"