这是一个带有嵌套 IF 语句的 Excel 公式:
=IF((B2="East"),4,IF((B2="West"),3,IF((B2="North"),2,IF((B2="South"),1,""))))
要基本上做到这一点:
If cell B2 = "East"
return "4"
ElseIf cell B2 = "West"
return "3"
ElseIf cell B2 = "North"
return "2"
ElseIf cell B2 = "South"
return "1"
Else
return ""
Excel 公式能不能写成这样“更易读”的方式,转换成官方的语法?有什么工具可以帮助编写 Excel 公式吗?
这可能是一个“超级用户”问题……但只有程序员可能知道答案!