0

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.

enter image description here

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:

  1. 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:

enter image description here

  1. I have to type in each reference manually. So its not really improving the original approach.
1

1 Answer 1

1

what you're describing is an extremely common question and is not possible the way you're hoping. the best thing to do is create the tabs NOW , but leave them blank and hide them. Then you can build your query the way you're used to even though for the time being those tabs will just be blank.

Sign up to request clarification or add additional context in comments.

1 Comment

What I currently have is at least working to some degree =query(indirect(Glossar!E3&"!A3:D"),"select * where A is not null",-1) I just need to find a way now to return more than one CELL from the reference sheet (Glossar)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.