【问题标题】:Combining AND statements with regexmatch将 AND 语句与正则表达式匹配
【发布时间】:2021-12-07 12:44:46
【问题描述】:

我正在尝试在 Google 表格中创建一个公式,该公式将根据特定条件输出“真”或“假”。

如果满足所有以下条件,我希望公式吐出“真”:

  • 单元格 B14 包含以下任一术语:“affinity|perception|perceptions|awareness|familiarity”
  • 单元格 B53 被选中(单元格有一个复选框)
  • 单元格 B54 被选中

我有下面这个公式,但它似乎没有做我想要的。

=IF((B53="true" AND( B54="true")),regexmatch(B14,"affinity|perception|perceptions|awareness|familiarity"))

提前感谢您的帮助!

【问题讨论】:

    标签: google-sheets google-sheets-formula formula


    【解决方案1】:

    试试

    =and(B53<>"true", B54<>"true",regexmatch(B14,"affinity|perception|perceptions|awareness|familiarity"))
    

    【讨论】:

      【解决方案2】:

      我认为“勾选”是指勾选了复选框?在这种情况下

      =and(B53,B54,regexmatch(B14,"affinity|perception|perceptions|awareness|familiarity"))
      

      尽管您不需要同时指定“感知”和“感知”,因为“感知”会同时包含两者。

      【讨论】:

        猜你喜欢
        • 2013-08-05
        • 1970-01-01
        • 2011-04-26
        • 2016-01-16
        • 2017-10-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多