EXCEL公式问题(假如A列的数如下,要想在B列当中:当A列的数为1或2时返回A...

假如A列的数如下,要想在B列当中:当A列的数为1或2时返回A,为3或4时返回B,为5或6时返回C,当为7或8时返回D,其余的返回E,要在B格中怎样输公式?

A列 B列
1
2
2
4
6
8
5
8
3
假如问题变成是,A列中的数如下,A列“最末位”为1或2时返回A,为3或4时返回B,为5或6时返回C,当为7或8时返回D,0或9时返回E,要在B格中怎样输公式?

A列 B列
401
512
732
644
856
228
385
998
523
最新回答
余盼兮

2024-09-18 11:10:57

在B1内输入:
=IF(OR(A1=1,A1=2),"A",IF(OR(A1=3,A1=4),"B",IF(OR(A1=5,A1=6),"C",IF(OR(A1=7,A1=8),"D","E"))))
然后填充拉下~
欲往

2024-09-18 17:54:08

B1=LOOKUP(--RIGHT(A1),{0,1,3,5,7,9},{"E","A","B","C","D","E"})
或者
B1=CHOOSE(RIGHT(A1)+1,"E","A","A","B","B","C","C","D","D","E")
向下复制公式