EXCEL表格的IF函数超过7层,怎么办?

2024-12-05 06:34:14
推荐回答(3个)
回答1:

按你公式改成如下
=IF(OR(M7={"F","LK"}),G343,IF(M7="T",G344,IF(M7="L",G345,IF(M7="X",G346,IF(M7="A",G347,IF(M7="B",G348,IF(M7="C",G349,IF(M7="D",G350,""))))))))*O7

再缩简
=IF(OR(M7={"F","LK"}),G343,IF(M7="T",G344,IF(M7="L",G345,IF(M7="X",G346,IF(OR(M7={"A","B","C","D"}),INDIRECT("G"&346+CODE(M7)-64),"")))))*O7

回答2:

可以用自定义名称来解决。另,你的前两个if可以合并为一个,你这两个是用的同一结果)
从你的公式看来,可以考虑用vlookup函数试下

回答3:

=IF(ISERR(FIND(LEFT(A4,1),"地墙天洁灯专水土")),IF(OR(F4=0,F4=""),"",MAX(B$1:B3)+1),TEXT(FIND(LEFT(A4,1),"地墙天洁灯专水土"),"[DBNum1]"))