I'm trying to repeat an Index function inside an ArrayFormula function and I have two problems:
The sum is done but I also have other results which I don't know where they come from (starting from the column P)
I can't figure out how to automatically take all the sheets that are listed in column A. For example, if I add a new sheet - let's say Client <200 in A4 with the sheet and all the data - I need to add the INDEX part in the ArrayFomula
=Arrayformula(INDEX(INDIRECT($A$1&"!$B"&match(C4,INDIRECT($A$1&"!A:A"),0)&":"&match(C4,INDIRECT($A$1&"!A:A"),0)))+INDEX(INDIRECT($A$2&"!$B"&match(C4,INDIRECT($A$2&"!A:A"),0)&":"&match(C4,INDIRECT($A$2&"!A:A"),0)))+INDEX(INDIRECT($A$3&"!$B"&match(C4,INDIRECT($A$3&"!A:A"),0)&":"&match(C4,INDIRECT($A$3&"!A:A"),0))))
The spreadsheet can be viewed here: https://docs.google.com/spreadsheets/d/1yBC4oQuhKOkIkf3lQZGBKcZQ3YjU_5N6MCIJZzdt0O4/edit?usp=sharing
Thank you!