Return true/false 基于来自多个单元格的特定文本

Return true/false based on specific text from multiple cells

我有 sheet 个包含 2 sheet 的文件。

第一个sheet:

Cell that should contain formula I am trying to make

第二个sheet:

2 columns with 15 rows each, where each cell can be blank or contain one of 3 predefined values (Good, Bad, Missing).

应该提供什么公式: 如果第二个 sheet 中的任何(不仅仅是全部)单元格包含 Bad 或 Missing,则在第一个 sheet 的单元格中显示 True,否则显示 False。

我已经用 regexmatchistext... 尝试了多个公式,但 none 适用于单元格范围。当我有一个单元格要检查时,我知道如何使用 regexmatch,但是当我有多个单元格并且问题是 "do any of the cells contain specific text, but not necessarily all" 时,我会感到困惑...

简化示例:

建议使用 Countif 来计算有多少 "Bad" 或 Missing":

=countif(Sheet2!B3:C17,"Bad")+countif(Sheet2!B3:C17,"Missing")

然后,如果您希望在结果大于零时将其报告为 TRUE,否则将报告为 FALSE,则需要将其更改为:

=(countif(Sheet2!B3:C17,"Bad")+countif(Sheet2!B3:C17,"Missing"))>0

备注

上面的公式中不需要外括号,因为 <,> 等具有最低的优先级,但可以提高可读性。

选择:

=countif(Sheet2!B3:C17,"Bad")+countif(Sheet2!B3:C17,"Missing")>0
=ARRAYFORMULA(IF(LEN(Sheet2!A3:A), 
 IF(((Sheet2!B3:B="bad")+(Sheet2!B3:B="missing"))* 
    ((Sheet2!C3:C="bad")+(Sheet2!C3:C="missing")), TRUE, FALSE), ))