1

以下是我在对嵌套 IF 进行一些研究后尝试过的东西,但是它只给出了语句第一部分的预期结果,而不是其余部分,谁能解释为什么或者我需要不同类型的函数?

=if(h4="basic","basic",if(g17>=500,"Standard",if(h4="standard","Standard",if(g17>=750,"Standard+",if(g17<=500,"Basic",if(h4="Standard+","standard+",If(g17<=750,"Standard",if(g17>=850,"Platinum",if(h4="Platinum","Platinum",if(g17<=850,"Standard+","Platinum"))))))))))

感谢你的协助。

4

3 回答 3

1

如果你有一个

if(g17>=500

后来你有

if(g17>=750

最后一个条件永远不会被“满足”,因为如果它真的是真的,它就不会像第一个条件一样被if(g17>=500测试True

我不知道“预期结果”、“声明的第一部分”或“其余部分”是什么,但希望这会有所帮助。

于 2013-11-11T17:16:08.760 回答
0

你可以试试这个

=IFERROR( INDEX({"basic","Standard","Standard+","Platinum"},MATCH(H4,{"basic","Standard","Standard+","Platinum"},0)),IF(G17>850,"Platinum",IF(G17>750,"Standard+",IF(G17>500,"Standard","Basic"))))
于 2013-11-11T20:02:19.347 回答
0

感谢您的建议,我认为我对自己的解释不太清楚,但最后有一些建议能够在这里解决,这是完成的公式:

=IF(AND(H4="Basic",G17<450),"Basic",IF(AND(H4="Basic",G17>=450),"Standard",IF(AND(H4="Standard",G17<450),"Basic",IF(AND(H4="Standard",G17>449,G17<700),"Standard",IF(AND(H4="Standard",G17>=700),"Standard+",IF(AND(H4="Standard+",G17>699,G17<800),"Standard+",IF(AND(H4="Standard+",G17<700),"Standard",IF(AND(H4="Standard+",G17>=800),"Platinum",IF(AND(H4="Platinum",G17<800),"Standard+","Platinum")))))))))
于 2013-11-18T19:48:58.273 回答