=IF(LEN(Q4)=0,"空",IF(LEN(Q4)=15,"老号",IF(LEN(Q4)<>18,"位数不对",IF(CHOOSE(MOD(SUM(MID(Q4,1,1)*7+MID(Q4,2,1)*9+MID(Q4,3,1)*10+MID(Q4,4,1)*5+MID(Q4,5,1)*8+MID(Q4,6,1)*4+MID(Q4,7,1)*2+MID(Q4,8,1)*1+MID(Q4,9,1)*6+MID(Q4,10,1)*3+MID(Q4,11,1)*7+MID(Q4,12,1)*9+MID(Q4,13,1)*10+MID(Q4,14,1)*5+MID(Q4,15,1)*8+MID(Q4,16,1)*4+MID(Q4,17,1)*2),11)+1,1,0,"X",9,8,7,6,5,4,3,2)=IF(ISNUMBER(RIGHT(Q4,1)*1),RIGHT(Q4,1)*1,"X"),"正确","错误"))))
这个工具可自动更正身份证号:
http://id.weixingmap.com/
1.根据身份证号码计算虚岁(当前年份-出生年份):
=YEAR(TODAY())-MID(C6,7,4)
2.根据身份证号码计算周岁(实足年龄):
=DATEDIF(D6,TODAY(),"Y")
=YEAR(TODAY())-MID(D2,7,4)
3.从身份证号码中提取出生日期:
=TEXT(MID(C6,7,8),"0000-00-00")*1
4.从身份证号码中提取性别:
=IF(ISODD(MID(C6,17,1)),"男","女")