Marcin Kot
Marcin Kot

Reputation: 11

Google Spreadsheet Query - combine three lists of results

I have 3 lists of items in a spreadsheet and all I waant to make one big list out of them. Could anyone please help?

List1:
a1

a2

List2: 
b1

b2
b3

List3:
c1

c2

THE RESULT (in my dreams:) - ONE BIG LIST without empty rows:

a1
a2
b1
b2
b3
c1
c2

My approach:

I tried sth like

= QUERY(A2:A; "select A where A !=''")&QUERY(B2:B; "select B where B !=''")=&QUERY(C2:C; "select C where C !=''")

But this does not work :(

Screen: http://prntscr.com/5acav3

a

The spreadsheet (public to edit) link

The problem is similar to the one in SQL Select values from multiple columns into single column but there are different commands and it is not working...

Best regards Marcin

Upvotes: 1

Views: 6862

Answers (1)

JPV
JPV

Reputation: 27282

In the sheet you shared I entered in H2:

=query({A2:A;B2:B;C2:C}; "Select * where Col1 <>'' ")

and in I2:

=ArrayFormula(transpose(split(concatenate(A2:C&"/");"/")))

Both formulas should output the same BIG list ... ;-)

Upvotes: 3

Related Questions