This is one of my favorite scripts I’ve ever built to “hack” Google Sheets. It allows you to reference the same cell on multiple sheets in a single call, rather than calling each one individually.
• As written, this script only accepts a single-cell range. It works on Sheet1:Sheet4!A1 but NOT on Sheet1:Sheet4!A1:A5. The latter is possible, but would require a modified script to perform an operation on the entire .getRange().getValues() array, rather than simply summing the values from .getRange().getValue()
• The code will not save with a number starting the function name, so I used _3dSum rather than 3dSum as the function name.