Adjust formula for across worksheets

Fin Fang Foom

Well-known Member
Joined
Mar 20, 2005
Messages
598
Hi everyone

I have this formula below it will sum across worksheets.

=SUMPRODUCT(SUMIF(INDIRECT("'"&$D$2:$D$4&"'!"&CELL("address",A1:B1)),"<>"))

However I would like A1 multiplies B1 so I tried to change the formula into this:

=SUMPRODUCT(SUMIF(INDIRECT("'"&$D$2:$D$4&"'!"&CELL("address",A1*B1)),"<>"))

You notice I changed the colon with a multiplication sign.

CELL("address",A1*B1)),"<>"))

It does not work, is there a work around for this?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hmm, I'll be honest with you here, I don't know if you can do this using standard Excel functions (someone like Domenic would be able to give you a much more definitive answer). However, if you download the morefunc add-in (see Recommended Links and Add-Ins thread) then you can use the THREED function:

=SUM(THREED(Sheet1:Sheet3!A1:A10)*THREED(Sheet1:Sheet3!B1:B10))

Confirmed with Ctrl+Shift+Enter. You can expand the sheets as required.
 
Upvote 0
1) Place the sheet names in D2:D4 in a horizontal range, say, in D2:F2.

2) Assuming that the sheet names are on a sheet named Results, define RowSpec as referring to:

=ROW(INDIRECT("'"&Results!$D$2&"'!A1:A10"))-ROW(INDIRECT("'"&Results!$D$2&"'!A1"))

Then invoke:

Code:
=SUMPRODUCT(
     N(OFFSET(INDIRECT("'"&$D$2:$F$2&"'!A1:A10"),RowSpec,0,1)),
     N(OFFSET(INDIRECT("'"&$D$2:$F$2&"'!B1:B10"),RowSpec,0,1)))

Note. This type of formulas are expensive and hard to maintain.
 
Upvote 0
1) Place the sheet names in D2:D4 in a horizontal range, say, in D2:F2.

2) Assuming that the sheet names are on a sheet named Results, define RowSpec as referring to:

=ROW(INDIRECT("'"&Results!$D$2&"'!A1:A10"))-ROW(INDIRECT("'"&Results!$D$2&"'!A1"))

Then invoke:

Code:
=SUMPRODUCT(
     N(OFFSET(INDIRECT("'"&$D$2:$F$2&"'!A1:A10"),RowSpec,0,1)),
     N(OFFSET(INDIRECT("'"&$D$2:$F$2&"'!B1:B10"),RowSpec,0,1)))

Note. This type of formulas are expensive and hard to maintain.


It's perfect Aladin thank you so much!

Hi RichardSchollar

Thank you for a alternate solution.

I'm going to go with Aldain solution because I never could get the morefunc add-in to work properly on my computers.


Thank you for all your help guys.
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,373
Members
449,155
Latest member
ravioli44

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