0

I am working on a project that requires a large 'pool' of data to pull from and sort from. To keep the workbook efficient, the data is kept in sets of SPILL's, as pulling a raw selected range for the sheets purposes is too inefficient. There are sets of multiple sheets with the workbook being designed around having more sheets added with ease based on copying a sheet template.

I won't get too much into the details but the point is to keep things simple there are a large amount of sheets with their own individual tables, on those sheets there are filters to trim down and SPILL out the tables data. Since all of the individual sheets are based on the template, the location of the data SPILL's for the sheets is the same, and can be pulled globally from the Master sheet.

The issue arises when the Master sheet attempts to pull all of the data. The only setups I've been able to create use TEXTJOIN's and CONCATENATE's to create a dynamic formula with the addition of more sheets, and the plan was to use have the dynamic list of names be placed into a VSTACK and then have INDIRECT used on the formula, which would have then spilled all of the data from all of the sheets into one massive(but efficient) SPILL. The issue is that as I was in dismay to find out is that INDIRECT and VSTACK don't like each other.

I have researched this issue a fair amount and all of the solutions I could find weren't geared towards the particular set up I have, specifically with SPILLS. I have also tried 3D referencing but the same kind of issue occurs, when 3D referencing would normally fix this issue, which means its a problem with SPILL's. So I am here now asking for any ideas, proposed solutions, or new formulas/VBA code to make this work/run well. Ideally a custom formula as a replacement to either VSTACK or INDIRECT that solves the issues they have with one another.

Example code of this issue would be VSTACK(Sheet1!A1#,Sheet2!A1#,Sheet3!A1#,ect.), followed by =INDIRECT in another cell referring to the cell with this text.

Edit: Here are images with a more clear show of the issue:

Individual Data Sheet Example(Sheets1-3 are the same)

Master Sheet Example

3
  • 1
    Hi Thomas, can you please provide a simple example of your data set, used formulas, etc.?
    – Muji
    Commented Dec 21, 2023 at 11:40
  • I have edited the post with more specific examples. I would like to upload the book itself but I do not know how or if I can. Commented Dec 21, 2023 at 12:29
  • I would suggest you explore subtituting the use of spilled arrays with power query to create the master table. Or if you are really just trying to create a dashboard fully graduate to a reporting tool like power bi/tableau, etc.
    – gns100
    Commented Dec 21, 2023 at 15:58

1 Answer 1

0

The question is posed too generally. Give specific examples of formulas that don't work.
If you have in D1:

=VSTACK(Sheet1!A1#,Sheet2!A1#,Sheet3!A1#)

this works:

=INDIRECT("D1#")

INDIRECT function requires a text of cell address as an argument. If you want to calculate a formula using its text as an argument you should use Evaluate method from VBA or an old EVALUATE function from XLM macros. Fortunately now you can combine this function with LAMBDA which makes it much more convenient to use.
To do so you should define LAMBDA in the Name Manager, e.g. eval:

=LAMBDA(x,IF(RAND(),EVALUATE(x)))

This RAND is necessary to make formula volatile.
Then you can use it in a sheet:

=eval(address)

where address (without quotes) refers to the cell with the text of formula.
Due to the use of EVALUATE function the workbook should be saved in .xlsm format.

2
  • I have edited the post with more specific examples. I would like to upload the book itself but I do not know how or if I can. Commented Dec 21, 2023 at 12:29
  • You are a saint thank you so much for the help this is incredibly useful. Have a great day. Commented Dec 21, 2023 at 13:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .