首页 > 解决方案 > 使用 NOT(ISBLANK) 将 2 列过滤为一列

问题描述

我有两列要转换为 1 列,但不显示空白。例如

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

预期结果:

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

我最好的选择是使用这个公式,但它不起作用。

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

你们能帮帮我吗?

标签: google-sheetsfiltergoogle-sheets-formulagoogle-sheets-querygoogle-query-language

解决方案


尝试:

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

或者:

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

推荐阅读