EXCEL 公式如何判断某单元格的数值是否满足条件并给出返回值

2024-11-01 05:34:34
有3个网友回答
网友(1):

假设要判断的数字在A1单元格,公式:
=IF(RIGHT(A1,1)="1",IF(RIGHT(A1,2)<>"11","1","11"),IF(RIGHT(A1,1)="2",IF(RIGHT(A1,2)<>"12","2","12"),IF(RIGHT(A1,1)="3",IF(RIGHT(A1,2)<>"13","3","13"),"无结果")))

网友(2):

如果数据在A1:A100中,B名输入
=IF((RIGHT(A1)-3>0)+(RIGHT(A1)="0"),"无结果",IF(LEFT(RIGHT(A1,2))="1",1,)&RIGHT(A1))
将B1中公式用自动
填充柄
下拉。
可以改为
=IF(OR(MOD(A1,10)={1,2,3}),IF(LEFT(RIGHT(A1,2))="1",1,)&RIGHT(A1),"无结果")

网友(3):

假设数据在A1单元格
B1单元格输入公式
=if(or(-right(a1)=-{1,2,3}),right(a1)+or(--right(a1,2)={11,12,13})*10,"无结果")

=if(or(mod(a1,10)={1,2,3}),right(a1)+(left(right(a1,2))="1")*10,"无结果")