1.性别提取:
A2单元格为身份证号可以替换为其它单元格
=IF(LEN(A2)=15,IF(MOD(MID(A2,15,1),2)=1,"男","女"),IF(MOD(MID(A2,17,1),2)=1,"男","女"))
2.出生日期提取:
=CONCATENATE(MID(A2,7,4),"/",MID(A2,11,2),"/",MID(A2,13,2))
3.年龄提取:
=DATEDIF(TEXT(MID(A2,7,8),"#-00-00"),TODAY(),"Y")&"岁"
效果:
发布于 2022-12-22 313 次阅读
1.性别提取:
A2单元格为身份证号可以替换为其它单元格
=IF(LEN(A2)=15,IF(MOD(MID(A2,15,1),2)=1,"男","女"),IF(MOD(MID(A2,17,1),2)=1,"男","女"))
2.出生日期提取:
=CONCATENATE(MID(A2,7,4),"/",MID(A2,11,2),"/",MID(A2,13,2))
3.年龄提取:
=DATEDIF(TEXT(MID(A2,7,8),"#-00-00"),TODAY(),"Y")&"岁"
效果:
Comments NOTHING