答案1
让我们拆分您的公式,以便您可以找到错误。
=IF(
E10>(TODAY()),
"Schedule CPD Presentation asap and consider changing sales start date",
IF(
AND(
E10 <= (TODAY()-1,E10< TODAY() +10),
"Query 1",
"Query 2"
)
)
)
这不是你想要的。错误出现在以下行:
E10 <= (TODAY()-1,E10< TODAY() +10),
您没有正确匹配括号。整个AND()
语句应如下所示:
AND(E10<=TODAY()-1,E10<TODAY()+10)
...但是你的是这样的:
AND(E10<=(TODAY()-1,E10<TODAY()+10)
第一个括号之前的多余括号TODAY()
会破坏所有内容,因此AND()
函数无法处理它需要的内容。如果您删除该括号(以及末尾的括号),您的公式将如下所示:
=IF(E10>(TODAY()), "Schedule CPD Presentation asap and consider changing sales start date", IF(AND(E10 <= TODAY()-1,E10< TODAY() +10), "Query 1", "Query 2"))
...可以分解如下:
=IF(
E10>(TODAY()),
"Schedule CPD Presentation asap and consider changing sales start date",
IF(
AND(
E10 <= TODAY()-1,
E10< TODAY() +10
),
"Query 1",
"Query 2"
)
)