I have a workbook with 30 or more sheets. Specifically, each sheet may be an invoice, change order, etc. such that the format of each sheet is not the same as the next one.
The named range Total on each sheet may refer to one or more random cells on that sheet. On the last sheet, I want one cell to show the sum of all cells named Total.
The number of sheets may vary. I do not want to use a pivot table.
Is this possible?
Addendum: The formula below will return the total of all cells that belong to any name "Total" on any of the listed sheets, but I would like to automate it so I don't have to manually add all of the sheet names. The name Total may refer to one cell or any collection of cells on each sheet. In actual use, the sheet names could be any random name. So, I'm looking for code that will look at each sheet, and if the sheet contains the name Total then it appends +SUM(sheetname!(Total) to the equation. The SUM function is necessary so that if there are two or more cells per sheet in the named range Total, then they are included in the GrandTotal. =SUM(Sheet1!Total)+SUM(Sheet2!Total)+SUM(Sheet3!Total)+SUM(Sheet4!Total)
Another example: The following shows why I think it's possible to do what I want in a single step. Formulas=GET.CELL(48,INDIRECT("rc",0)) creates a real-time dynamic named range "Formulas" that includes every cell in the workbook which contains a formula. You can then conditionally format all cells to have a shaded background when the cell contains a formula.
So, I'm looking for a function something like: GrandTotal=SUM(GET.CELL("Total",INDERECT("rc",0)) where Total efers to any cell that belongs to a range named Total.
Formulas
named range to shade cells with a formula: The formula you've given does not work as a named range on which you can perform functions. It returns eitherTRUE
orFALSE
depending on whether or not a particular cell has a formula in it. If you use it for conditional formatting and apply it to a large range, it will evaluate each cell individually.Get.Cell
, take a look here