[英]How do I write the formula in Excel for a nested if when value is false on multiple ifs?
I have a nested if that has 我有一个巢,如果有
=IF(A1=10,"you have 10 points","otherwise blank",IF(A1=20,"you have 20 points","otherwise blank",IF(A1=30,"you have 30 points","otherwise blank"))) = IF(A1 = 10,“你有10点”,“否则为空白”,IF(A1 = 20,“你有20点”,“否则为空白”,IF(A1 = 30,“你有30点”, “否则为空白”)))
What I want is that if it finds 10,20 or 30 to give those outputs otherwise don't display any output, but I get an error that say 我想要的是,如果找到10,20或30来提供这些输出,否则不显示任何输出,但是我得到一个错误,说
You've entered too many arguments for this function. 您为此函数输入了太多参数。
Try doing this: 尝试这样做:
=if(A1=10,"you have 10 points",if(A1=20,"you have 20 points",if(A1=30,"you have 30 points","")))
The logic is as following: 逻辑如下:
How about: 怎么样:
=If(OR(A1=10,A1=20,A1=30),"You have " & A1 & " points","")
Or: 要么:
=IF(ISNUMBER(MATCH(A1,{10,20,30},0)),"You have " & A1 & " points","")
Your formula should be something like this: 您的公式应如下所示:
=IF(OR(A1=10,A1=20, A1=30), A1, "") = IF(OR(A1 = 10,A1 = 20,A1 = 30),A1,“”)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.