Google-sheets – Query multiple data input ranges into 1 column output

google sheetsgoogle-sheets-query

Not 100% sure how to explain this, feel free to edit this with more intelligent language.

I need to pull data from 2 tables in 1 sheet. Meaning, I need multiple query functions. Those query functions need to output vertically.

Both of my query functions work independently, but trying to combine them, only the first query function outputs.

Using this post as a guideline:

Query Multiple Ranges with Results in Row

I wrote this function

={QUERY(A3:B,"select A where B is null");QUERY(D3:F,"select D where(E='Yes' AND F is null)")}

My understanding is

={...} Creates an array that was explained as

The curly brackets {} are used when you want to access more than one
thing, like you want to pull data from more than one tab sheet…

Source: https://productforums.google.com/forum/#!msg/docs/WOWhf-lGxmo/xsHQt4C2AQAJ

; should output vertically instead of horizontally.

My example sheet

https://docs.google.com/spreadsheets/d/1lZeBDsrfPrfFU_Aj6Em-3dvtav3K8k869cYx7vAazpo/edit?usp=sharing

(Images in case you don't want to click the link)

enter image description here
The output that I get is just hello from Table 1 and nothing from Table 2, which should output with Foo appended after hello

How can I get the output from the 2nd query to show up?

Best Answer

The "problem" is that the formula is using open references so there are a lot of blank cells from Table 1 above the Foo value.

One way to avoid having a lot of blank cells is to filter them out:

={QUERY(A3:B,"select A where A is not null AND B is null");QUERY(D3:F,"select D where(E='Yes' AND F is null)")}