B1单元格写入公式
=IF(A1="","",4-FIND(A1,"ABCD"))
或
=IF(A1="","",4-MATCH(A1,{"A","B","C","D"},))
再或
=IF(A1="","",INDEX({3,2,1,0},FIND(A1,"ABCD")))
=IF(A1="","",MID(3210,FIND(A1,"ABCD"),1))
在B1中输入或复制粘贴此公式
=IF(A1="","",LOOKUP(A1,{"A","B","C","D"},{3,2,1,0}))
下拉填充
B1=IF(A1="a",3,IF(A1="b",2,IF(A1="c",1,IF(A1="d",0))))
记得要加"",因为a是字符串
=IF(A1="A",3,IF(A1="b",2,IF(A1="c",1,0)))
B1公式?
=4-MATCH(A1,{"A","B","C","D"},)
b1=if(a1=a,3,if(a1=b,2,if(a1=c,1,if(a1=d,0))))