假设身份证号码(18位,文本格式)在D2单元格,则有效性检验公式为:
- =IF(LEFT(H5,17)&MID("10X98765432",MOD(SUM(MID(H5,1,1)*2^17,MID(H5,2,1)*2^16,MID(H5,3,1)*2^15,MID(H5,4,1)*2^14,MID(H5,5,1)*2^13,MID(H5,6,1)*2^12,MID(H5,7,1)*2^11,MID(H5,8,1)*2^10,MID(H5,9,1)*2^9,MID(H5,10,1)*2^8,MID(H5,11,1)*2^7,MID(H5,12,1)*2^6,MID(H5,13,1)*2^5,MID(H5,14,1)*2^4,MID(H5,15,1)*2^3,MID(H5,16,1)*2^2,MID(H5,17,1)*2^1),11)+1,1)=H5,"真实的","错")
复制代码 在实际操作中,需要把公式里所有的D2替换为你表格中的单元格坐标。
|