Breakdown:
=C12+INDIRECT((MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)-1)&"!"&"C12")
The Blue section is just the total on the current page.
The Purple section outlines how we use INDIRECT to build a cell reference rather than just type it in.
Indirect([previous sheetname] + "!C12" becomes just 1!C12 once the construct completes.
The Green shows how we use a function to "figure out" what the [previous sheetname] is. That MID formula is a standard trick for displaying the CURRENT Sheetname in a cell, so I put it in the formula instead.
Since the current sheetname is numerical, we can subtract one from it and that becomes my [previous sheetname]. I underlined where I did that, above.
That completes the construct and it just becomes a normal reference at that point.
Bookmarks