Forum Discussion
Formula that sums inventory items from multiple sheets using 2 criteria
- Nov 28, 2023
Here's a general formula you can try to use:
=SUMPRODUCT(SUMIFS(INDIRECT("'"&SheetList&"'!E2:E200"),INDIRECT("'"&SheetList&"'!C2:C200"),C137,INDIRECT("'"&SheetList&"'!F2:F200"),H137))
Formula is untested.
Using INDIRECT with a range of cells from multiple sheets can be resource intensive and may slow down performance, especially as your data grows. If you experience performance issues, consider alternative approaches, such as using Power Query or consolidating your data into a single table.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and Like it!
This will help all forum participants.
I would avoid INDIRECT if any other solutions are available.
Have you tried appending the data using PowerQuery and then grouping by Part ID?
Another option using 365 is to identify the data as a named 3D range and use VSTACK to convert it to a single array. I think you would then need to filter the quantities by each Part ID in turn using MAP and SUM. There is a new function GROUPBY which is in the process of being rolled out as we speak that should perform the last task more efficiently.