如何使用查询函数与复选框分类多个列
我需要使用查询函数和复选框对多个列进行排序,这些复选框指示要排序哪些列。这应该与多列一起使用。
这是公式:
=IFERROR(ARRAYFORMULA(
QUERY(
{AI4:AY101, TRIM(FLATTEN(QUERY(TRANSPOSE(AJ4:AY101),,9^9)))},
"Select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13, Col14, Col15, Col16, Col17
where Col18 is not null
order by
Col"&$P$1&" "&$P$3&"
", )),"Loading…")
如果我仅检查1个复选框,则适用于单列。 如果我检查多个复选框,是否有办法使其对多列进行排序?
演示文件:
https://docs.google.com/spreadsheets/d/1x-ikvur8heobwkkaozwfditsf4wxwfcgropiewokaoi/edit
I need to sort multiple columns using the QUERY function together with checkboxes which indicate which columns to sort. This should work with multiple columns.
This is the formula:
=IFERROR(ARRAYFORMULA(
QUERY(
{AI4:AY101, TRIM(FLATTEN(QUERY(TRANSPOSE(AJ4:AY101),,9^9)))},
"Select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13, Col14, Col15, Col16, Col17
where Col18 is not null
order by
Col"&$P$1&" "&$P$3&"
", )),"Loading…")
It works for single columns if I check only 1 checkbox.
Is there a way to make it sort multiple columns if I check multiple checkboxes?
Demo file:
https://docs.google.com/spreadsheets/d/1x-IkvUr8hEoBwkKaoZWfdITSf4WXwFCgROpIEwOkaOI/edit
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试:
try: