假如A列的数如下,要想在B列当中:当A列的数为1或2时返回A,为3或4时返回B,为5或6时返回C,当为7或8时返回D,其余的返回E,要在B格中怎样输公式?A列 B列122468583假如问题变成是,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
在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"))))然后填充拉下~
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")向下复制公式