SUM Product alternative

andrewwhitfield

New Member
Joined
Mar 28, 2011
Messages
31
I'm hoping someone can help me with an alternative to the Sum Product formula i have been using.

SUMPRODUCT(--(C:C=C3),N:N)<>0

Lets say for example the same value exist in C3, C4, C5 i get the return from the formula where the SUM of N3, N4 N5 does not equal 0. What I actually need is to identify where the value in any of N3, N4 N5 does not contain zero.

My issue being positives and negatives could net to zero currently which I need to avoid.
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,438
Office Version
  1. 365
Platform
  1. Windows
Perhaps
Excel Formula:
=COUNTIFS(C:C,C3,N:N,"<>0")
Sumproduct should also work if you move <>0 inside the closing bracket, but it is far less efficient.
Excel Formula:
=SUMPRODUCT(--(C:C=C3),--(N:N<>0))
 

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,413
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Not sure I understand what you want. Does this work?
=SUMPRODUCT((C:C=C3)*(N:N<>0),N:N)
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,438
Office Version
  1. 365
Platform
  1. Windows
Does this work?
=SUMPRODUCT((C:C=C3)*(N:N<>0),N:N)
Wouldn't that be the same as
Excel Formula:
=SUMIFS(N:N,C:C,C3,N:N,"<>0")
or are you seeing something that I'm not?
 

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,413
Office Version
  1. 365
  2. 2010
Platform
  1. Windows

ADVERTISEMENT

Wouldn't that be the same as
Excel Formula:
=SUMIFS(N:N,C:C,C3,N:N,"<>0")
or are you seeing something that I'm not?
Yes, the same, but the title asks for a sumproduct alternative ...
 

andrewwhitfield

New Member
Joined
Mar 28, 2011
Messages
31
Thanks for the responses guys. having just stuck my formula into another workbook i get the result i expected. There must be something wrong elsewhere in the worksheet.
 

andrewwhitfield

New Member
Joined
Mar 28, 2011
Messages
31
Thanks for the responses guys. having just stuck my formula into another workbook i get the result i expected. There must be something wrong elsewhere in the worksheet.
Scrap that i was talking rubbish. I think they way to do this is to ignore negatives in the sum so only a column of actual 0 values would equate to 0. for example -1 and 1 would equal 2 not 0. Any help appreciated.

I also tested the examples above and the all give me the same result i have now.
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,438
Office Version
  1. 365
Platform
  1. Windows
Perhaps
Excel Formula:
=SUMIFS(N:N,C:C,C3,N:N,">0")+ABS(SUMIFS(N:N,C:C,C3,N:N,"<0"))
 

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,413
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
If it does the same thing then it is an alternative...
Yes, I see that, but the SUMIFS was not offered when I posted the alternative SUMPRODUCT. You had offered COUNTIFS in post #2.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,464
Messages
5,624,885
Members
416,064
Latest member
PaulBr2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top