[英]How to simplify "IS NOT NULL" for multiple columns when using QUERY function in Google Sheets?
我有这个公式:
=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&"")
有没有办法让它更短? 我真的需要重复and ColX is not null
吗?
加入他们。 假设您的范围是 A:F 并且您想检查 B:F is not 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", ))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.