多个嵌套IF和AND语句中的参数错误太多

时间:2017-08-21 12:58:46

标签: excel

我遇到多个嵌套IF语句的问题。我有多个栏目,我指的是。

逻辑是这样的:

If response by = "No response required" then blank
If allocation days <2, "target achieved" else "target missed", 
If allocation days < 1 AND date allocated = blank, "target on track" else "target missed",
If allocation days <=1 AND date allocated = not blank, "target achieved" else "target missed"

我到目前为止的公式是:

IF([RESPONSE BY]="NO RESPONSE REQUIRED","",  IF([@[Allocation days]]<2,"Target Achieved","Target Missed"),  IF(AND([@[Allocation days]]<1,[@[Date allocated]]=""),"Target On Track","Target Missed"),   IF(AND([@Allocation days]]<=1,COUNTA[@[Date allocated]]), "Target Achieved", "Target Missed")

代码一直工作到第二个IF语句,然后excel说这个函数的参数太多了。非常感谢任何帮助,我是新手!

1 个答案:

答案 0 :(得分:0)

删除除最后,"Target Missed")之外的所有内容,并将)添加到结尾。

=IF([@[RESPONSE BY]]="NO RESPONSE REQUIRED","",IF(AND([@[Allocation Days]]<=1,COUNTA([@[Date Allocated]])),"Target Achieved",IF(AND([@[Allocation Days]]<1,[@[Date Allocated]]=""),"Target On Track", IF([@[Allocation Days]]<2, "Target Achieved", "Target Missed"))))