I know that this is not considered good practice here, but I want to do something like this. And it replicates the functionality of the database to some extent, but I don’t have the time or support to build it from scratch when there is something already half in place.
The reason I want to do this is to create a pivot table that references all the worksheets in the book, and automatically expands if you insert a new worksheet. This is the management of large large trading / reporting tables with many different business units that have the same structure (that is, they use the same sheet format to report the same results to different people. There is high staff turnover. Sheets reporting on various aspects of the source code, which takes a long time to cope with recreating all the tables each time.
You can use string () as an index marker to determine the information you want to use, such as REPLACE, OFFSET, or INDEX, but you cannot, because they apply only to 2D arrays.
While Excel treats three-dimensional links as arrays for aggregate functions, it does not seem to do the same for referenced functions. You can have SUM (sheetX: sheetY! A1) and be able to add a sheet between them, there is no (for example) INDEX function (sheetX: sheetY! A1, n). I tried to experiment using these 2D functions as part of the array formulas and define a three-dimensional reference as an array or a named range ... well, it was worth it :).
Therefore, I consider this a valid action. I also believe that there should be a way to do this, but so far I am abandoning the UDF, which is prone to errors caused by calculation problems, or is manipulating the Workbook_SheetChange function or similar. Or create a single master list to manage all the others that are filled in using a routine based on an array of all books.
source share