=sumproduct

GigEm

New Member
Joined
Dec 6, 2011
Messages
8
My goal is to sum the product of two numbers on a data entry sheet, given the entry meets certain criteria, and display the answers on a sum sheet separated by size and material type. Here is the formula so far...

=SUMPRODUCT(--('Piping Takeoff'!J15:J24="bwsw"),--('Piping Takeoff'!H15:H24=0),--('Piping Takeoff'!K15:K24=0.5),'Piping Takeoff'!K15:K24*'Piping Takeoff'!M15:M24)

J15:J24 is weld type
H15:H24 is the material type
K15:K24 is the pipe size

The formula works as is, but I need to change one thing for it to suit my needs. Rather than summing data if the weld type (J15:J24) ="bwsw", I need it to sum the data if the weld type matches any of a list (Y2:Y59) of text strings, i.e. "bwsw", "bwxs", "swxs".

Substituting "bwsw" for Y2:Y59 does not work.
=SUMPRODUCT(--('Piping Takeoff'!J15:J24=Y2:Y59),--('Piping Takeoff'!H15:H24=0),--('Piping Takeoff'!K15:K24=0.5),'Piping Takeoff'!K15:K24*'Piping Takeoff'!M15:M24)

I realize I could include all 57 of the weld types with "" and ,'s but I'm looking for the proper way to include a list in the =sumproduct function.

Thanks.
 

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

=SUMPRODUCT(--ISNUMBER(MATCH('Piping Takeoff'!J15:J24,Y2:Y59,0)),--('Piping Takeoff'!H15:H24=0),--('Piping Takeoff'!K15:K24=0.5),'Piping Takeoff'!K15:K24,'Piping Takeoff'!M15:M24)
 
Upvote 0
GigEm,

Maybe this will give you an idea:

=SUMPRODUCT(--($D$5:$D$162={"cri","maj","enh","min"})*($J$5:$J$162="DataContent")*($Y$5:$Y$162))
 
Upvote 0
Try...

=SUMPRODUCT(--ISNUMBER(MATCH('Piping Takeoff'!J15:J24,Y2:Y59,0)),--('Piping Takeoff'!H15:H24=0),--('Piping Takeoff'!K15:K24=0.5),'Piping Takeoff'!K15:K24,'Piping Takeoff'!M15:M24)

That is exactly what I needed. Thank you. I had just used that recently too!
 
Upvote 0

Forum statistics

Threads
1,214,665
Messages
6,120,803
Members
448,990
Latest member
rohitsomani

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