EXCEL,原号码首位为7的在原号码前面加6,原号码首位为2.3.5.6的在原号码前面加8,其余的原号码错

2024-12-02 15:40:02
推荐回答(3个)
回答1:

B2公式:
=IF(LEFT(A2,1)="7",6&A2,IF(LEFT(A2,1)="2",8&A2,IF(LEFT(A2,1)="3",8&A2,IF(LEFT(A2,1)="5",8&A2,IF(LEFT(A2,1)="6",8&A2,"原号码错误")))))
下拉即可

回答2:

=IF(LEFT(A1,1)="7",6&A1,(IF(OR(LEFT(A1,1)={"2","3","5","6"}),8&A1,"原号码错误")))

回答3:

=IF(MID(A2,1,1)="7","6"&A2,IF(OR((MID(A2,1,1)="2"),(MID(A2,1,1)="3"),(MID(A2,1,1)="6"),(MID(A2,1,1)="5")),"8"&A2,"原号码错误"))