简体   繁体   中英

Having trouble with multiple queries in Google Sheets

I'm trying to combine 2 queries into one formula so the 2nd query always shows below the first

Query 1:

QUERY('Input Monday'!A4:J201,"SELECT A, B, C, D, F, G, H, I, J WHERE ((lower(A) = 'h&h')) AND ((lower(D) != 'melbourne'))")

Query 2:

QUERY('Home and Host input'!A2:M100,"SELECT A, B, C, D, E, F, G, H, I, J, K WHERE ((A = datetime '"&TEXT(SATURDAY!B1,"yyyy-mm-dd HH:mm:ss")&"'))")

Both work fine on their own although when i combine them i either get a parse error, or an array_litteral error

Does anyone know have any tips or know of another way for a 2nd query to find the bottom row of the first query then add it to the next row?

to put them under each other both needs to have equal amount of columns. try:

={QUERY('Input Monday'!A4:J201,
 "select A,B,C,D,F,G,H,I,J,' ','  ' 
  where lower(A) = 'h&h' 
    and lower(D) != 'melbourne'
  label ' ''','  '''");
 QUERY('Home and Host input'!A2:M100,
 "select A,B,C,D,E,F,G,H,I,J,K 
  where A = datetime '"&TEXT(SATURDAY!B1, "yyyy-mm-dd HH:mm:ss")&"'")}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM