sumproduct Rows and Column reference that Contains string

djossh

Board Regular
Joined
Jul 27, 2009
Messages
241
Please help. im trying to sumtotal all column(s) that contains text string "Meal" in col B7:O7 (Book2/sheet1) and (Book2/sheet1 Col A8:A37 that match with my row refence in Col A7 (Book1/sheet1).... sum range is B8:O37



Here is my current formula... and its not working.. i dont know how to write the right formula that will give me the results i wanted.. thanks

(In Book1/sheet1 cell E7)

=SUMPRODUCT(('[Book2.xls]sheet1'!$B$7:$O$7=SUMPRODUCT(ISNUMBER(SEARCH("*"&Meal&"*",'[Book2.xls]sheet1'!$B$7:$O$7)*('[Book2.xls]Sheet1'!$A$8:$A$37=$A7)*('[Book2.xls]sheet1'!$B$8:$O$37)))))
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
Please help. im trying to sumtotal all column(s) that contains text string "Meal" in col B7:O7 (Book2/sheet1) and (Book2/sheet1 Col A8:A37 that match with my row refence in Col A7 (Book1/sheet1).... sum range is B8:O37



Here is my current formula... and its not working.. i dont know how to write the right formula that will give me the results i wanted.. thanks

(In Book1/sheet1 cell E7)

=SUMPRODUCT(('[Book2.xls]sheet1'!$B$7:$O$7=SUMPRODUCT(ISNUMBER(SEARCH("*"&Meal&"*",'[Book2.xls]sheet1'!$B$7:$O$7)*('[Book2.xls]Sheet1'!$A$8:$A$37=$A7)*('[Book2.xls]sheet1'!$B$8:$O$37)))))
Control+shift+enter, not just enter:

Code:
=SUM(
   IF(ISNUMBER(SEARCH("Meal",'[Book2.xls]sheet1'!$B$7:$O$7)),
   IF('[Book2.xls]Sheet1'!$A$8:$A$37=$A7,
     '[Book2.xls]sheet1'!$B$8:$O$37)))
 

djossh

Board Regular
Joined
Jul 27, 2009
Messages
241
Control+shift+enter, not just enter:

Code:
=SUM(
   IF(ISNUMBER(SEARCH("Meal",'[Book2.xls]sheet1'!$B$7:$O$7)),
   IF('[Book2.xls]Sheet1'!$A$8:$A$37=$A7,
     '[Book2.xls]sheet1'!$B$8:$O$37)))


Thanks for your quick reply bu it's not working the way it should be..
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
it gives me "0" (zero) results...i think its not summing up the sumrange?? (Im not sure, i really dont know what's causes "0" result)

Did you apply control+shift+enter to the formula? That is: Press the control and shift keys down while you hit the enter key...
 

Watch MrExcel Video

Forum statistics

Threads
1,122,514
Messages
5,596,611
Members
414,080
Latest member
penguin23

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