Excel If 函数参数过多

Excel If 函数参数过多

IT 告诉我参数太多,但我不知道如何减少它的参数以使其工作,似乎无法使这个工作,

=IF(ToFind<MyNumber,"Too low",  IF(ToFind>MyNumber,"Too high","Got it!"), If(ISBLANK(ToFind),""))

toFind 和 MyNumber 是命名单元格

答案1

将 ISBLANK 放在第一位:

=If(ISBLANK(ToFind),"",IF(ToFind<MyNumber,"Too low",  IF(ToFind>MyNumber,"Too high","Got it!")))

答案2

的语法IF是:=IF([logical test],[result if test = true],[result if test = false])

你有=IF([ToFindMyNumber],[result1],[result2]),[bunch of other stuff that won't evaluate])

我不知道“ToFindMyNumber”是什么意思。如果这是一个逻辑测试 - 即返回 TRUE 或 FALSE 值的关系,那么直到第一个值为止的所有内容在)语法上都是有效的,并且您将根据其结果返回“太高”或“明白了!”。

看起来你可能在尝试嵌套 if?你实际上并没有说明你想做什么。将其编辑到你的问题中可能会有所帮助。除此之外,只需确保你遵守整体语法,并注意括号。

示例:从基本语法开始,=IF([logical test],[result if true],[result if false])我们可以扩展——如果第一个测试是错误的,而您想尝试其他的东西,该怎么办?

=IF([logical test],[result if true],[result if false])

=IF([logical test],[result if true],[IF([logical test],[result if true],[result if false])])

看看另一个完整的IF评估如何适合第一个的 `[result if false]' 参数?这就是你这样做的方法。

相关内容