Selected Answer
Here's the formula that will do the job. Paste it to D4 and copy down.
=SUMPRODUCT(SUMIFS(INDIRECT("'"&$G$2:$G$4&"'!$B$13:$B$50"),INDIRECT("'"&$G$2:$G$4&"'!$E$13:$E$50"),A2,INDIRECT("'"&$G$2:$G$4&"'!$H$13:$H$50"),B2,INDIRECT("'"&$G$2:$G$4&"'!$K$13:$K$50"),C2))
However, before it can work, please enter a list of the sheets in the range G2:G4. There may not be any blanks in this range but you can make the list longer or shorter, provided you adjust the range in the formula. Of course, that brings us to two topics.
- Named ranges.
G2:G4 should be a dynamic, named range.
- Create a named range, say "Sheets", assign the range G2:G4 to the name and then replace the explicit reference $G$2:$G$4 with the implicit reference Sheets.
- Then make the range the name refers to dynamic, meaning let it take the measure of what you write in that column and expand or shrink the last row of the range. In that way you wouldn't need to adjust the formula when the list grows or shrinks.
- Fill the range with available sheet names automatically.
It may be possible to create such a list using a worksheet function. The problem may be how to exclude the "Summary" sheet (and perhaps others) from the list either at input or output time. The list could also be produced using a macro.
As you see, the topic shifts from your original question to farflung and different subjects. It's your project and you must take control. See how far you get with the basic function I have provided above. Further adaptation to your project's needs, though clearly visible and listed above, can't fit into the Q & A format we are bound to here. Please ask other questions if you need more help.