伟哥NO·1
2024-11-16 06:49:59
最佳回答
在a1输入1,2,3,4,b1显示,b1输入以下公式公式一=if(a1=1,"op1",if(a1=2,"op2",if(a1=3,"cl3",if(a1=4,"cl4","")))) 函数if可以嵌套七层公式二=lookup(a1,{1,2,3,4},{"op1","op2","cl3","cl4"}) 可以自已在公式的两个中括号中输入对应的值,{ },{ },下面这个公式是改进的,不让出现错误值=if(or(a1="",a1=0,a1>4),"",lookup(a1,{1,2,3,4},{"op1","op2","cl3","cl4"}))公式三=choose(a1+1,"","op1","op2","cl3","cl4")这个公式是从0开始对应的,当你输入0时,对应的值是"",输入1时是op1......条件可以自已增加,比如输入5要出一个值,自已在后面再添上要的值,下面这个公式是改进的,不让出现错误值=if(a1>4,"",choose(a1+1,"","op1","op2","cl3","cl4")) 20210311