I am currently combining two queries that are looking in two sheets.
={query(Sheet1!A3:D,"select * where A is not null",-1);query(Sheet2!A3:D,"select * where A is not null",-1)}
Knowing that in the future I could have 10 different sheets to gather data from, I'd like to create a reference sheet, where I just write the name of the sheet in a range and the query picks this up dynamically. Here is how this would be pieced together potentially.
ReferenceSheet!E2&"!A3:D" --> Sheet1!A3:D
So instead of putting in the range manually and stich one query after another, I'd like to create the Data Range based on the reference sheets data and look through all of them together. So Sheet1 and Sheet2 are combined in one query. My current approach looks like this:
=query(ReferenceSheet!E3&"!A3:V" & ";" & ReferenceSheet!E4&"!A3:V" & ";" & ReferenceSheet!E5&"!A3:V","select * where Col1 is not null",-1)
This causes two issues:
- This range, even tough it gives me the correct "text" is actually not working in the query. I think half of the dynamic range gets ignored and its just "seeing" the Reference Sheet part of it. Thats what I get out of the query:
- I have to type in each reference manually. So its not really improving the original approach.

