Google 工作表、IF、AND、REGEXMATCH、DATE 组合公式

Google Sheets, IF, AND, REGEXMATCH, DATE combined Formula

我正在努力实现以下目标:

IF
    Cells B5:B6 and B8:B9 contains ☑
AND
    Todays date is less than 7 days after the date defined in cell B2
THEN
    In the cell the formula is added write 'On Time' otherwise write 'Behind'

我试过下面的公式,但是 returns 'Formula parse error'

=IF(AND((REGEXMATCH((B5:B6,B8:B9), "☑")),(B2+7) < today() ), 'On Time', 'Running Behind')

关于如何实现此功能有什么想法吗?

编辑

从测试来看,问题似乎出在 REGEXMATCH 无法按照我定义的方式检查 2 个不同的单元格。

可能需要使用一些研究ArrayFormula(--

试试这样:

=IF((REGEXMATCH(JOIN("", B5:B6, B8:B9), "☑"))*
 ((B2+7) < TODAY() ), "On Time", "Running Behind")