我使用以下excel公式来确定单元格的值。我一直得到一个" #VALUE!"错误。有人可以帮忙吗?
=OR(IF(AND(P3="NewEE",LEFT(O3,1)="D"),"DENTAL",IF(AND(P3="BEN2",LEFT(O3,1)="H"),"MEDICAL",
IF(AND(P3="BEN3",LEFT(O3,1)="V"),"VISION"))),IF(AND(Q3="NewEE",LEFT(O3,1)="D"),"DENTAL",
IF(AND(Q3="BEN2",LEFT(O3,1)="H"),"MEDICAL",IF(AND(Q3="BEN3",LEFT(O3,1)="V"),"VISION"))),
IF(AND(R3="NewEE",LEFT(O3,1)="D"),"DENTAL",IF(AND(R3="BEN2",LEFT(O3,1)="H"),"MEDICAL",
IF(AND(R3="BEN3",LEFT(O3,1)="V"),"VISION"))))
示例1:
示例2:
答案 0 :(得分:0)
您希望嵌套所有ifs而不使用OR():
=IF(AND(P2="NewEE",LEFT(O2,1)="D"),"DENTAL",IF(AND(P2="BEN2",LEFT(O2,1)="H"),"MEDICAL",IF(AND(P2="BEN3",LEFT(O2,1)="V"),"VISION",IF(AND(Q2="NewEE",LEFT(O2,1)="D"),"DENTAL",IF(AND(Q2="BEN2",LEFT(O2,1)="H"),"MEDICAL",IF(AND(Q2="BEN3",LEFT(O2,1)="V"),"VISION",IF(AND(R2="NewEE",LEFT(O2,1)="D"),"DENTAL",IF(AND(R2="BEN2",LEFT(O2,1)="H"),"MEDICAL",IF(AND(R2="BEN3",LEFT(O2,1)="V"),"VISION","")))))))))