Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sumproduct not working | Excel Worksheet Functions | |||
Working time and days | Excel Discussion (Misc queries) | |||
Sumproduct w/date criteria not working | Excel Worksheet Functions | |||
SUMPRODUCT and format problems (2) | Excel Discussion (Misc queries) | |||
Sumproduct - multiple criteria in Column A | Excel Worksheet Functions |