SumIf multiple sheets/books

SailorJerry7030

New Member
Joined
Apr 27, 2018
Messages
30
Hello!

I'm trying to modify a SumIf to sum across multiple sheets (they are actually workbooks though). Below is the formula I have right now however it's not working. Example A and Example B are their own individual sheets in their own workbooks.

=sumproduct(SUMIF(Indirect("'"[Example A.xlsx]Schedule&[Example B.xlsx]Schedule"'!$U$13:$U$17"),$B40,Indirect("'"[Example A.xlsx]Schedule&[Example B.xlsx]Schedule"'!$V$13:$V$17)))


The goal here is to sum V13:V17 in Example A when criteria in B40 is met in range U13:U17 and to sum S13:S17 in Example B when criteria in B40 is met in range R13:R17. Obviously, I'm missing the ranges from Example B, but I was hitting my head against a wall and decided to come here for help.

I tried checking before and that's how I came across the sumproduct example but couldn't get it to work properly.

Any help is greatly appreciated!
 
=SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!A2:A10"),D2,INDIRECT("'"&SheetList&"'!B2:B10")))

will work as advertised if SheetList refers to a range housing one by one the names of the relevant sheets, all in the same workbook.

If SheetList refers to range housing workbook names like [Example A.xlsx]Schedule, I don't expect the above formula to work. (By the way, neither INDIRECT nor SUMIF work with closed workbooks.


Assuming the workbook is open then, a SumIF referencing an open workbook works fine. The same logic should be able to be applied to multiple workbooks, no? Assuming they are all open. If not, can you think of any other way to accomplish this? I can't connect to the workbooks through the Data tab at the top due to them being housed on Sharepoint and there are access issues getting in the way.
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Assuming the workbook is open then, a SumIF referencing an open workbook works fine. The same logic should be able to be applied to multiple workbooks, no?
[...]

The answer is no. Having a bunch of sheets in one workbook is simply not the same thing as having a bunch of workbooks.

If not, can you think of any other way to accomplish this? I can't connect to the workbooks through the Data tab at the top due to them being housed on Sharepoint and there are access issues getting in the way.

Start a different thread with something like "conditional summing across multiple workbooks with vba" as topic.
 
Upvote 0

Forum statistics

Threads
1,224,836
Messages
6,181,248
Members
453,026
Latest member
cknader

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