# SUM Product alternative

#### andrewwhitfield

##### New Member
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.

### Excel Facts

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

#### jasonb75

##### Well-known Member
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
Not sure I understand what you want. Does this work?
=SUMPRODUCT((C:C=C3)*(N:N<>0),N:N)

#### jasonb75

##### Well-known Member
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

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
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.

#### jasonb75

##### Well-known Member

but the title asks for a sumproduct alternative ...
If it does the same thing then it is an alternative...
an alternative to the Sum Product formula i have been using.

#### andrewwhitfield

##### New Member
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
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
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.

Replies
6
Views
154
Replies
0
Views
86
Replies
4
Views
62
Replies
1
Views
59
Replies
2
Views
423

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?

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