Reputation: 1741
I'm mixing 2 sheets (input1 and input2) into a 3rd sheet using a Google Sheets Query. The only thing is that I need some columns and not all of them, and in a different order.
sheet: input1
date serie_1 serie_2 client
1/1/2019 2 6 Client A
1/2/2019 1 6 Client A
1/3/2019 5 8 Client B
1/4/2019 3 8 Client A
1/5/2019 8 2 Client B
1/6/2019 7 5 Client A
1/7/2019 5 5 Client B
1/8/2019 6 6 Client A
1/9/2019 4 3 Client B
1/10/2019 4 10 Client A
1/11/2019 5 8 Client B
1/12/2019 5 8 Client A
1/13/2019 2 5 Client B
1/14/2019 9 8 Client A
1/15/2019 4 1 Client B
sheet input2
date serie_3 serie_4 client
1/1/2019 6 1 Client A
1/2/2019 6 1 Client A
1/3/2019 8 1 Client A
1/4/2019 8 1 Client A
1/5/2019 2 1 Client A
1/6/2019 5 1 Client A
1/7/2019 5 1 Client B
1/8/2019 6 1 Client B
1/9/2019 3 1 Client A
1/10/2019 10 1 Client A
1/11/2019 8 1 Client B
1/12/2019 8 1 Client B
1/13/2019 5 1 Client A
1/14/2019 8 1 Client B
1/15/2019 1 1 Client A
expected output using Query
date serie_1 serie_2 serie_3 client
The following query is processed:
={query({input1!A2:D},"select Col1,Col2,Col3,' ',Col4 where Col1 is not null label ' '''");query({input2!A2:D},"select Col1,' ',' ',' ',Col2,Col4 where Col1 is not null label ' ''',' ''',' '''")}
Results
Error
In ARRAY_LITERAL, an Array Literal was missing values for one or more rows.
Can you please help me?
Upvotes: 0
Views: 4705
Reputation: 1
try like this:
={query({input1!A2:D},"select Col1,Col2,Col3,' ',Col4 where Col1 is not null label ' '''");
query({input2!A2:D},"select Col1,' ',' ',Col2,Col4 where Col1 is not null label ' ''',' '''")}
Upvotes: 1