excel函数公式应用:从身份证号码中进行年龄判断
=IF(A3<>””,DATEDIF(TEXT((LEN(A3)=15*19&MID(A3,7,6+(LEN(A3)=18*2),”#-00-00”),TODAY(),”Y”),)
=DATEDIF(A1,TODAY(),“Y”)
(以上公式会判断是否已过生日而自动增减一岁)
=YEAR(NOW())-MID(E2,IF(LEN(E2)=18,9,7),2)-1900
=YEAR(TODAY())-IF(LEN(A1)=15,"19"&MID(A1,7,2),MID(A1,7,4))
=YEAR(TODAY())-VALUE(MID(B1,7,4))&"岁"
=YEAR(TODAY())-IF(MID(B1,18,1)="",CONCATENATE("19",MID(B1,7,2)),MID(B1,7,4))