Sumproduct multiple criteria

Hoss97

Board Regular
Joined
Feb 2, 2009
Messages
84
I am trying to add a second criteria to a sumproduct formula, and am struggling to get it right.

=SUMPRODUCT(--(ISNUMBER(SEARCH("*frame",$D$4:$D$75))),--($E$4:$E$75=O2),($C$4:$C$75))

This formula works as written, but I need to add a second word "set" for the d4:d75 range. So if it ends with frame or set, that it will return the totals. I'm sure this is an easy fix, but I can't figure it out. Thank you for any help.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try:

=SUMPRODUCT(((ISNUMBER(SEARCH("frame",$D$4:$D$75)))+(ISNUMBER(SEARCH("set",$D$4:$D$75)))),--($E$4:$E$75=O2),($C$4:$C$75))
 
Upvote 0
That works perfectly...thank you very much. If I follow that same format, how many other criteria will I be able to add?
 
Upvote 0
The + acts as OR, so you are only limited by the maximum for the length of a formula. Here's another (shorter) way:

=SUMPRODUCT(--(ISNUMBER(SEARCH({"frame","set"},$D$4:$D$75)))*($E$4:$E$75=O2)*($C$4:$C$75))
 
Upvote 0
Thank you Andrew...knowing that the + acts as an or helps alot. I will play around with the shorter formula, and modify it as necessary. Thank you for your help. Problem Solved!
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,259
Members
452,901
Latest member
LisaGo

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