Sumproduct syntax

neodjandre

Well-known Member
Joined
Nov 29, 2006
Messages
950
Office Version
  1. 2019
Platform
  1. Windows
I am trying to sumproduct if my column has "j" flag and if the sum does not equal to 0.

=SUMPRODUCT(($E$9:$E$289="j")*--(M$9:M$289)<>0)

this doesnt work as expected. any ideas please?

thanks
Andrew
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try...

Code:
=SUMPRODUCT(($E$9:$E$289="j")*(M$9:M$289<>0))

Or, using the comma styntax...

Code:
=SUMPRODUCT(--($E$9:$E$289="j"),--(M$9:M$289<>0))

Hope this helps!
 
Upvote 0
Hi,

Solution above will provide you the "Count" of Column E="j" and respective Column M<>0
So if you only want the Count, you can just use COUNTIFS

If you actually want the SUM, then I don't see the need to check for 0 (zero)
And you can just use SUMIF


Book1
EJM
119
219
32
419
11j9
12j10
13j0
Sheet209
Cell Formulas
RangeFormula
J1=SUMPRODUCT(($E$9:$E$289="j")*(M$9:M$289<>0)*M$9:M$289)
J2=SUMPRODUCT(($E$9:$E$289="j")*M$9:M$289)
J3=COUNTIFS($E$9:$E$289,"j",$M$9:$M$289,"<>0")
J4=SUMIF($E$9:$E$289,"j",$M$9:$M$289)
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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
Back
Top