Google 表格查询有助于更好地使用 OR AND

问题描述 投票:0回答:1

多年来我一直在努力寻找更优雅的解决方案来解决我的问题......而不是

“选择 *,其中非 Col42 包含“#CBCno”且非 Col42 包含“#CBCnever”且非 Col42 包含“#noCBC”且非 Col42 包含“#CBClead””

有什么方法可以将多个条件列出在一个条件中,以便更容易更改吗?例如:

“选择 Col42 不包含的 * ('#CBCno' OR '#CBCnever' OR '#noCBC' OR '#CBClead')”

我已经用谷歌搜索了多次,并尝试了各种带有 OR 想法的括号,但到目前为止没有一个有效...我最近发现我可以使用 MATCHES '(#CBCnever|#CBCno)' 但我需要使用 'contains' 不找到完全匹配:(

任何人都可以帮助(或让我摆脱痛苦)吗?

google-sheets-formula
1个回答
0
投票

使用

matches
子句:

"where not Col42 matches '.*(#CBCno|#CBCnever|#noCBC|#CBClead).*'"
© www.soinside.com 2019 - 2024. All rights reserved.