Hello,
I have data tables on different tabs.
I have a query formula that uses indirect on a per table reference basis to bring in the text required to complete the formula. It works fine but I want to make it dynamic by concatenating the entire text string of references together and importing that text to the query.
EXISTING STATE:
=QUERY({INDIRECT(Projects!G1);INDIRECT(Projects!G2);INDIRECT(Projects!G3);INDIRECT(Projects!G4);INDIRECT(Projects!G5);INDIRECT(Projects!G6);INDIRECT(Projects!G7)}, "select * where Col1 is not null")
This looks to the cells located on Project tab to pull in the path text for each individual table of data. It works good. But when I add a new table of data I have to go in and manually change this formula to add the new reference.
FUTURE STATE:
Project!J5 in this example would be dynamically created using CONCATENATE.
I want to create this entire text string using CONCATENATE in a dynamic way so the formula gets updated automatically when I add a new data table: Project!J5 would have this text string in it:
{INDIRECT(Projects!G1);INDIRECT(Projects!G2);INDIRECT(Projects!G3);INDIRECT(Projects!G4);INDIRECT(Projects!G5);INDIRECT(Projects!G6);INDIRECT(Projects!G7)}
I tried the following, but it gives me an error saying the text string is not a valid reference.
Compare this to my existing state to see what I am trying to do.
=QUERY(INDIRECT(Projects!J5), "select * where Col1 is not null")
Is there a way to make this formula work?
Thank you!
I have data tables on different tabs.
I have a query formula that uses indirect on a per table reference basis to bring in the text required to complete the formula. It works fine but I want to make it dynamic by concatenating the entire text string of references together and importing that text to the query.
EXISTING STATE:
=QUERY({INDIRECT(Projects!G1);INDIRECT(Projects!G2);INDIRECT(Projects!G3);INDIRECT(Projects!G4);INDIRECT(Projects!G5);INDIRECT(Projects!G6);INDIRECT(Projects!G7)}, "select * where Col1 is not null")
This looks to the cells located on Project tab to pull in the path text for each individual table of data. It works good. But when I add a new table of data I have to go in and manually change this formula to add the new reference.
FUTURE STATE:
Project!J5 in this example would be dynamically created using CONCATENATE.
I want to create this entire text string using CONCATENATE in a dynamic way so the formula gets updated automatically when I add a new data table: Project!J5 would have this text string in it:
{INDIRECT(Projects!G1);INDIRECT(Projects!G2);INDIRECT(Projects!G3);INDIRECT(Projects!G4);INDIRECT(Projects!G5);INDIRECT(Projects!G6);INDIRECT(Projects!G7)}
I tried the following, but it gives me an error saying the text string is not a valid reference.
Compare this to my existing state to see what I am trying to do.
=QUERY(INDIRECT(Projects!J5), "select * where Col1 is not null")
Is there a way to make this formula work?
Thank you!