如何用数组中的情况替换多列或条件?
我的原型在这里: 将公式放在单元格b2中的表格
我有此查询工作,但是where where the where”如果可能的话,数组不会优化条款。
=IFERROR(QUERY(F:N, "SELECT F WHERE G CONTAINS '"&A2&"' OR H CONTAINS '"&A2&"' OR I CONTAINS '"&A2&"' OR J CONTAINS '"&A2&"' OR K CONTAINS '"&A2&"' OR L CONTAINS '"&A2&"' OR M CONTAINS '"&A2&"' OR N CONTAINS '"&A2&"'"),"")
是否有一个公式可以通过数组删除所有或子句?
我尝试没有成功:
SELECT ArrayFormula(textjoin(", ",TRUE,("Col"&row(indirect("A"&F1&":A"&O1)))))
My prototype here :
the sheet where the formula is place in cell B2
I have this query working but the "where" clause is not optimized by an array if it's possible.
=IFERROR(QUERY(F:N, "SELECT F WHERE G CONTAINS '"&A2&"' OR H CONTAINS '"&A2&"' OR I CONTAINS '"&A2&"' OR J CONTAINS '"&A2&"' OR K CONTAINS '"&A2&"' OR L CONTAINS '"&A2&"' OR M CONTAINS '"&A2&"' OR N CONTAINS '"&A2&"'"),"")
Is there a formula to remove all OR clause by an array ?
I tried with no success:
SELECT ArrayFormula(textjoin(", ",TRUE,("Col"&row(indirect("A"&F1&":A"&O1)))))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
而不是使用
或
喜欢:您可以做:
instead of using
OR
like:you can do:
如果情况很简单,不一定会更有效,但是如果它是一个复杂或长的代码,则可以设计类似于某些情况的标志,并且只需将所需结果的数组与您实际获得的数组进行比较。
It's not necessarily more efficient if the case is simple, but if it's a complicated or long code you could design flags that resemble certain situations and just compare the array of the wanted outcome to the array that you actually get.