多个嵌套 IF(AND(OR) 语句
Multiple Nested IF(AND(OR) Statements
我想为多个 IF 条件编写一个公式,该公式将显示在我的单元格 S23 中。
- IF: H23= "X" 或 "removed"
- 然后:S23="X"
.
- IF: I23= "EWS" 或 "removed"
- 然后:S23="EWS"
.
- IF: H23= "X" 或 "removed" AND I23="EWS" 或 "removed"
- 然后:S23="X + EWS"
.
我的公式:
=if(H23="chex", "chex", IF(I23="EWS", "EWS", IF(H23="removed", "chex", (IF(I23="removed", "EWS", ""))))))))
它工作正常,但没有捕获最后一个 AND 条件。我没有使用 =IF(OR(H23, ">0" etc
,因为此单元格也可以包含 "NA"。我只希望它捕获 "X" 或 "removed" 条件。
知道如何添加最后一个条件:如果 H23 和 I23 分别包含 "removed" 或 "X" / "EWS",那么结果是 "X+EWS"?
这有效:=IF(AND(OR(H23="x",H23="removed"),OR(I23="EWS",I23="removed")),"x+EWS",IF(OR(H23="x",H23="removed"),"x",IF(OR(I23="EWS",I23="removed"),"EWS","")))
我修改了@pnuts原公式:=IF(AND(OR(H23="X",H23="removed"),OR(I23="EWS",I23="removed")),"X+EWS",IF(OR(H23="X",AND(H23="removed",I23<>"removed")),"X",IF(OR(I23="EWS",I23="removed"),"EWS","TBD")))
删除的粗体部分:
AND( H23="removed" ,I23<>"removed")
具体来说,这个参数:
来自 IF(OR(H23="X",AND(H23="removed",I23<>"removed")),"X",
到IF(OR(H23="X",H23="removed"),"X",
是团队的努力。感谢@pnuts 和@user0 的帮助! :)
我想为多个 IF 条件编写一个公式,该公式将显示在我的单元格 S23 中。
- IF: H23= "X" 或 "removed"
- 然后:S23="X"
.
- IF: I23= "EWS" 或 "removed"
- 然后:S23="EWS"
.
- IF: H23= "X" 或 "removed" AND I23="EWS" 或 "removed"
- 然后:S23="X + EWS"
.
我的公式:
=if(H23="chex", "chex", IF(I23="EWS", "EWS", IF(H23="removed", "chex", (IF(I23="removed", "EWS", ""))))))))
它工作正常,但没有捕获最后一个 AND 条件。我没有使用 =IF(OR(H23, ">0" etc
,因为此单元格也可以包含 "NA"。我只希望它捕获 "X" 或 "removed" 条件。
知道如何添加最后一个条件:如果 H23 和 I23 分别包含 "removed" 或 "X" / "EWS",那么结果是 "X+EWS"?
这有效:=IF(AND(OR(H23="x",H23="removed"),OR(I23="EWS",I23="removed")),"x+EWS",IF(OR(H23="x",H23="removed"),"x",IF(OR(I23="EWS",I23="removed"),"EWS","")))
我修改了@pnuts原公式:=IF(AND(OR(H23="X",H23="removed"),OR(I23="EWS",I23="removed")),"X+EWS",IF(OR(H23="X",AND(H23="removed",I23<>"removed")),"X",IF(OR(I23="EWS",I23="removed"),"EWS","TBD")))
删除的粗体部分: AND( H23="removed" ,I23<>"removed")
具体来说,这个参数:
来自 IF(OR(H23="X",AND(H23="removed",I23<>"removed")),"X",
到IF(OR(H23="X",H23="removed"),"X",
是团队的努力。感谢@pnuts 和@user0 的帮助! :)