您的位置首页生活百科

excel函数if公式怎么嵌套超过7层啊

excel函数if公式怎么嵌套超过7层啊

的有关信息介绍如下:

excel函数if公式怎么嵌套超过7层啊

=IF(AND(N4="一个月",O4="高",P4="配合"),"A",IF(AND(N4="一个月",O4="中",P4="配合"),"A",IF(AND(N4="一个月",O4="高",P4="配合"),"A",IF(AND(N4="半年",O4="高",P4="配合"),"B",IF(AND(N4="三个月",O4="中",P4="配合"),"B",IF(AND(N4="一个月",O4="低",P4="配合"),"B",IF(AND(N4="三个月"早改或,O4="高",P4="不配合"),"B","")))))))&IF(AND(N4="三个月",O4="低",P4="配合"),"B",IF(AND(N4="三个月",O4="低",P4="配合"),"B",IF(AND(N4="一个月",O4="中",P4="不配合"),"B",IF(AND(N4="一个月",O4="高",P4="不配合"),"B",IF(AND(N4="半年",O4="中",P4="配合"),"B",IF(AND(N4="一个月",O4="低",P4="不配合"),"C",IF(AND(N4="三个月",O4="中",P4="不配合"),"C","")))))))&IF(AND(N4="三个月",O4="低",P4="不配合"),"C",IF(AND(N4="半年",O4="高",P4="不配合"),"C",IF(AND(N4="半年",O4="中",P4="不配合"),"C",IF(AND(N4="半年",O4="低",P4="配合"),"C",IF(AND(N4="半年",O4="低",P4="不配合"),"C","")))))“&”后面不要“,”,第二段超过7层。其实陆伍公式还可精简,把N4的三种歼弯情况分开处理,就可以减少嵌套数。看到这么长的IF,有点烦!重新组合精简后,可以不超过7层嵌套.=IF(OR(N4="",O4="",P4=""),"",IF(N4="一个月",IF(P4="配合",IF(O4="低","B","A"),IF(O4="低","C","B")),IF(N4="三个月",IF(P4="配合",IF(O4="低","C","B"),IF(O4="高","B","C")),IF(P4="配合",IF(O4="低","C","B"),"C"))))