如何简化“不是无效”对于在Google表中使用查询功能时的多个列?

发布于 2025-02-13 18:18:43 字数 760 浏览 0 评论 0原文

我有这个公式:

=QUERY(
    {AG4:AW101},
    "Select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13, Col14, Col15, Col16, Col17 
    where Col1 is not null
    and Col1 is not null
    and Col2 is not null
    and Col3 is not null
    and Col4 is not null
    and Col5 is not null
    and Col6 is not null
    and Col7 is not null
    and Col8 is not null
    and Col9 is not null
    and Col10 is not null
    and Col11 is not null
    and Col12 is not null
    and Col13 is not null
    and Col14 is not null
    and Col15 is not null
    and Col16 is not null
    and Col17 is not null
    order by Col"&$N$1&" "&$N$2&"")

无论如何是否可以使它短?我真的需要重复,而Colx不是每个列的null

I have this formula:

=QUERY(
    {AG4:AW101},
    "Select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13, Col14, Col15, Col16, Col17 
    where Col1 is not null
    and Col1 is not null
    and Col2 is not null
    and Col3 is not null
    and Col4 is not null
    and Col5 is not null
    and Col6 is not null
    and Col7 is not null
    and Col8 is not null
    and Col9 is not null
    and Col10 is not null
    and Col11 is not null
    and Col12 is not null
    and Col13 is not null
    and Col14 is not null
    and Col15 is not null
    and Col16 is not null
    and Col17 is not null
    order by Col"&$N$1&" "&$N$2&"")

Is there anyway to make it shorter? Do I really need to repeat and ColX is not null for every column?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酷遇一生 2025-02-20 18:18:44

加入他们。假设您的范围是:f,您想检查b:f for 不是null,然后尝试:

=ARRAYFORMULA(QUERY({A:F, TRIM(FLATTEN(QUERY(TRANSPOSE(B:F),,9^9)))}, 
 "select Col1,Col2,Col3,Col4,Col5,Col6
  where Col7 is not null", ))

join them. lets say your range is A:F and you want to check B:F for is not null, then try:

=ARRAYFORMULA(QUERY({A:F, TRIM(FLATTEN(QUERY(TRANSPOSE(B:F),,9^9)))}, 
 "select Col1,Col2,Col3,Col4,Col5,Col6
  where Col7 is not null", ))
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文