excel身份证提取性别

Excel 2020-08-06

不同公式实现通过身份证号码判断性别

公式如下:

=IF(MOD(MID(A2,17,1),2)=0,"女","男")
=IF(ISODD(MID(A3,17,1)),"男","女")
=IF(ISEVEN(MID(A4,17,1)),"女","男")
=CHOOSE(MOD(MID(A5,17,1),2)+1,"女","男")
=IF(MOD(MID(A6,17,1),2)=0,"女","男")
=IF(ISODD(MID(A7,17,1)),"男","女")
=IF(ISEVEN(MID(A8,17,1)),"女","男")
=CHOOSE(MOD(MID(A9,17,1),2)+1,"女","男")
=VLOOKUP(MOD(MID(A10,17,1),2),{1,"男";0,"女"},2,FALSE)
=VLOOKUP(ISODD(MID(A11,17,1)),{TRUE,"男";FALSE,"女"},2,FALSE)
=VLOOKUP(MOD(MID(A12,17,1),2),{1,"男";0,"女"},2,FALSE)
=VLOOKUP(ISODD(MID(A13,17,1)),{TRUE,"男";FALSE,"女"},2,FALSE)
=VLOOKUP(ISEVEN(MID(A14,17,1)),{TRUE,"女";FALSE,"男"},2,FALSE)
=VLOOKUP(ISEVEN(MID(A15,17,1)),{TRUE,"女";FALSE,"男"},2,FALSE)
=HLOOKUP(MOD(MID(A16,17,1),2),{0,1;"女","男"},2,FALSE)

学习更多内容请关注公众号

附件.xlsx

知识共享署名声明
本文由 herokay 创作,采用 知识共享署名 3.0,可自由转载、引用,但需署名作者且注明文章出处。

还不快抢沙发

添加新评论