按你公式改成如下
=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
可以用自定义名称来解决。另,你的前两个if可以合并为一个,你这两个是用的同一结果)
从你的公式看来,可以考虑用vlookup函数试下
=IF(ISERR(FIND(LEFT(A4,1),"地墙天洁灯专水土")),IF(OR(F4=0,F4=""),"",MAX(B$1:B3)+1),TEXT(FIND(LEFT(A4,1),"地墙天洁灯专水土"),"[DBNum1]"))