<menuitem id="cxwpg"></menuitem>
    <menuitem id="cxwpg"><optgroup id="cxwpg"><thead id="cxwpg"></thead></optgroup></menuitem>
  1. <option id="cxwpg"></option>
    <div id="cxwpg"><td id="cxwpg"></td></div>
        1. <samp id="cxwpg"><strong id="cxwpg"></strong></samp>
        2. <track id="cxwpg"><span id="cxwpg"></span></track>
          <bdo id="cxwpg"><optgroup id="cxwpg"></optgroup></bdo>
          返回首页
          当前位置: 主页 > Excel教程 > Excel函数教程 >

          Excel如何把身份证升为18位£¬提取出生年月£¬性别£¬年龄

          时间:2016-12-17 21:48来源:Office教程学习网 www.12042044.com编辑:麦田守望者

          以下假设身份证号码放在A1单元格中¡£

          1.从身份证号码中提取出生年月日£º

          假如身份证号数据在A1单元格£¬在B1单元格中编辑公式=IF(LEN(A1)=15,"19"&MID(A1,7,2)&MID(A1,9,2)&MID(A1,11,2),MID(A1,7,4)&MID(A1,11,2)&MID(A1,13,2))这样输出格式就都是19821010这种格式了¡£

          可以通过下述操作£¬完成形如1978-12-24样式的出生年月日自动提取£º假如身份证号数据在C2单元格=IF(LEN(A1)=15,MID(A1,7,2)&"-"&MID(A1,9,2)&"-"&MID(A1,11,2),MID(A1,7,4)&"-"&MID(A1,11,2)&"-"&MID(A1,13,2))¡£

          2.从身份证号码中提取性别:

          =IF(MOD(MID(A1,15,3),2),"男","女")

          3.从身份证号码中提取年龄£º

          =DATEDIF(TEXT(MID(A1,7,LEN(A1)*2/3-4),"0-00-00"),TODAY(),"Y")

          4.将15位身份证升位为18位£º

          =IF(LEN(A1)=15,(REPLACE(A1,7,,19))&(INDEX({1,0,"X",9,8,7,6,5,4,3,2},1,(MOD(SUM(MID(REPLACE(A1,7,,19),1,1)*7+MID(REPLACE(A1,7,,19),2,1)*9+MID(REPLACE(A1,7,,19),3,1)*10+MID(REPLACE(A1,7,,19),4,1)*5+MID(REPLACE(A1,7,,19),5,1)*8+MID(REPLACE(A1,7,,19),6,1)*4+MID(REPLACE(A1,7,,19),7,1)*2+MID(REPLACE(A1,7,,19),8,1)*1+MID(REPLACE(A1,7,,19),9,1)*6+MID(REPLACE(A1,7,,19),10,1)*3+MID(REPLACE(A1,7,,19),11,1)*7+MID(REPLACE(A1,7,,19),12,1)*9+MID(REPLACE(A1,7,,19),13,1)*10+MID(REPLACE(A1,7,,19),14,1)*5+MID(REPLACE(A1,7,,19),15,1)*8+MID(REPLACE(A1,7,,19),16,1)*4+MID(REPLACE(A1,7,,19),17,1)*2),11))+1)),A1)

          ------分隔线----------------------------
          标签(Tag):excel excel2013 Excel函数公式 DATEDIF函数
          ------分隔线----------------------------
          推荐内容
          猜你?#34892;?#36259;
          ÄÚÃɹÅ11Ñ¡5¼Æ»®
          <menuitem id="cxwpg"></menuitem>
            <menuitem id="cxwpg"><optgroup id="cxwpg"><thead id="cxwpg"></thead></optgroup></menuitem>
          1. <option id="cxwpg"></option>
            <div id="cxwpg"><td id="cxwpg"></td></div>
                1. <samp id="cxwpg"><strong id="cxwpg"></strong></samp>
                2. <track id="cxwpg"><span id="cxwpg"></span></track>
                  <bdo id="cxwpg"><optgroup id="cxwpg"></optgroup></bdo>
                  <menuitem id="cxwpg"></menuitem>
                    <menuitem id="cxwpg"><optgroup id="cxwpg"><thead id="cxwpg"></thead></optgroup></menuitem>
                  1. <option id="cxwpg"></option>
                    <div id="cxwpg"><td id="cxwpg"></td></div>
                        1. <samp id="cxwpg"><strong id="cxwpg"></strong></samp>
                        2. <track id="cxwpg"><span id="cxwpg"></span></track>
                          <bdo id="cxwpg"><optgroup id="cxwpg"></optgroup></bdo>