EXCEL如当A1为1,2,3,4,5,时, 则B1自动显示为6,7,A,B,D ,求公式,谢谢

2024-12-04 05:57:14
推荐回答(5个)
回答1:

双击B1单元格,编写
=IF(A1=1,6,IF(A1=2,7,IF(A1=3,"A",IF(A1=4,"B",IF(A1=5,"D","")))))
"问题补充"里的公式
双击B1单元格,编写
=IF(OR(A1=1,A1=2,A1=3,A1=4,A1=5),"D",IF(OR(A1=6,A1=7,A1=8,A1=9,A1=10),"X",""))

回答2:

=LOOKUP(A1,{1,2,3,4,5},{"6","7","A","B","D"})
但是如果A1不是1,2,3,4,5的时候,结果就乱了

回答3:

B1输入
=IF(AND(A1>=1,A1<=5),LOOKUP(A1,{1,2,3,4,5},{6,7,"A","B","D"}),"")
第二问
=IF(AND(A1>=1,A1<=5),"D",IF(AND(A1>=6,A1<=10),"X",""))
或者
=LOOKUP(INT(A1/5.1),{0,1},{"D","X"}),"')

回答4:

=LOOKUP(A1,{1,2,3,4,5},{"6","7","A","B","D"})

回答5:

=CHOOSE($A$1,6,7,"A","B","D")