EXCEL验证身份证号码真伪的公式,请问图中完整的公式应该是怎样的?

2020-06-16 社会 98阅读
身份证校验码是根据前16位对16个系数乘积之和除以11的余数来确定的,10余数对10个校验码:0,1,2,3,4,5,6,7,8,9,10对应1,0,"X",9,8,7,6,5,4,3,2。计算校验码公式,比如身份证号码在A2,B2输入=LOOKUP(MOD(SUMPRODUCT(--MID(A2,COLUMN(A1:Q1),1),{7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2}),11),{0,1,2,3,4,5,6,7,8,9,10},{1,0,"X",9,8,7,6,5,4,3,2}),要判定对还是错,可以在B2输入=IF(LEN(A2)<16,"不是18位身份证号",IF(--RIGHT(A2)=LOOKUP(MOD(SUMPRODUCT(--MID(A2,COLUMN(A1:Q1),1),{7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2}),11),{0,1,2,3,4,5,6,7,8,9,10},{1,0,"X",9,8,7,6,5,4,3,2}),"对","错"))
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com