the formula =SUM(IF($Sheet1.C16=main.B12,$Sheet1.M9,0)+IF($Sheet2.C16=main.B12,$Sheet2.M9,0)) works but listing a hundred sheets is not workable I have tried =SUM(IF($Sheet1.C16=main.B12,$Sheet1.M9,0):IF($Sheet2.C16=main.B12,$Sheet2.M9,0)) and many varations of sumifs and sumif I do not seem to find a formula that will work.
I would expect sum cell value of all sheets that meet the condition
If you have to handle such a poorly designed spreadsheet, and the formula with a built-in function is too cumbersome (and also broken), then just write your own function. For example, like this:
It's not much longer than listing the names of a hundred sheets in one formula. Call it as
=SHEETS_SUMIF($main.B12;"C16";"M9";"main")and get result.