Search code examples
google-sheetsfiltergoogle-sheets-formulagoogle-sheets-querygoogle-query-language

FILTER 2 columns into one with NOT(ISBLANK)


I have two columns which I want to convert into 1 column, but not showing the blanks. e.g.

|---------------------|------------------|
|      Column 1       |     Column 2     |
|---------------------|------------------|
|       Test1         |      Test2       |
|---------------------|------------------|
|                     |                  |
|---------------------|------------------|
|       Test4         |      Test3       |
|---------------------|------------------|

Expected result:

|---------------------|
|      Column 1       |
|---------------------|
|       Test1         |
|---------------------|
|       Test2         |
|---------------------|
|       Test3         |
|---------------------|
|       Test4         |
|---------------------|

My best bet would be using this formula, but it is not working.

=FILTER({E6:G17,E22:G33},NOT(ISBLANK({E6:G17,E22:G33})))

Can you guys help me out?


Solution

  • try:

    =QUERY({A:A; B:B}, "where Col1 is not null")
    

    or:

    =FILTER({A:A; B:B}, {A:A; B:B}<>"")