当前位置:网站首页>How excel automatically matches gender code according to ID number
How excel automatically matches gender code according to ID number
2022-07-22 08:25:00 【plantro888】
Use excel form , Sometimes you need to enter your identity 、 Gender and other information . The ID card can be machine swiped or imported , But if the gender is entered manually , Too many people are troublesome . In particular, we need to deal with a large number of student data in the recruitment work of our school , ID number and gender are essential data .
Today I'd like to share a excel Code , It can automatically match the gender of men and women according to the ID number .
Everyone knows that every digit of China's identity number has a specific meaning , And the penultimate ID number (18 No. of ID number 17 position ) It refers to the signs of men and women , If the first 17 If you are single, you are male , Even numbers are women .
Knowing this, we can easily write a code to automatically identify the gender of men and women in ID cards .
The code is :IF(MOD(MID(C2,17,1),2=1," male "," Woman ")
The formula should be :=IF(MOD(MID(C2,17,1),2)=1," male "," Woman ")
Reading :
MID(C2,17,1) The function takes the number of ID number 17 position ;
MOD(MID(C2,17,1),2)=1 Yes, please 17 Whether the number of digits is odd ( The first 17 Number of digits divided by 2 The remainder after is 1 It's an odd number );
IF(MOD(MID(C2,17,1),2)=1," male "," Woman ") If the judgment is odd, it is male , Otherwise, it's female
边栏推荐
- 原码一位乘法器
- MySQL regexp case insensitive solution
- Spark read CSV file operation, explanation of option parameter
- grpc-middleware实现grpc调用重试
- 线程池7个参数的含义
- STM32 SPI 读取数据不准确,只有第一次对,后边均不对
- [case design] event distributor - sharing and implementation of cross class event response ideas
- R语言ggplot2可视化:可视化散点图并为散点图中的数据点添加公式标签、使用ggrepel包的geom_text_repel函数避免数据点公式标签互相重叠(添加公式标签)
- R language tests the significance of correlation coefficient: use cor.test function to calculate the value and confidence interval of correlation coefficient and its statistical significance (if the v
- NOR FLASH 和 NAND FLASH异同
猜你喜欢
更细粒度的 useEffect
IDEA 如何自动导入(import)
"Everything is interconnected, enabling thousands of industries", the 2022 open atom global open source summit openatom openharmony sub forum is about to open
excel 中粘贴时怎么不覆盖
Generating function (linear recursive relationship, generating function concept and formula derivation, violent calculation) 4000 word detailed analysis, with examples
Fast Fourier transform, Lagrange interpolation, three thousand words with examples, sister chapters, application of FFT and string matching
STM32 HAL库 SPI总是读出FF的问题解决!
How to make random factors in the game win the trust of players again
SPI调试不成功很有可能是你线接错了!!
使用 SUM 函数对区域中的数字求和
随机推荐
No.js--- based on V8 and IO_ Running JS runtime
Next. JS and Remix
Unified payment callback interface of Alipay (applicable to H5, PC and APP)
jmmert聚合测试报告
CDH 6.1 environment construction graphic tutorial
Spark 读取csv文件操作,option参数解释
日期处理bean
一文教你检测MOS管好坏的五大诀窍「建议收藏」
地址总线、数据总线、控制总线详细解释
pytorch如何将Variable或Tensor转换为numpy?
支付宝统一支付回调接口(适用于H5、PC、APP)
不用编程也能做应用开发?能!
西门子博图安装期间反复重启的问题处理
Linux(Centos)安装Mysql
資料分享|HC-05藍牙模塊資料
CDH 6.1 环境搭建图文教程
Airflow详细搭建过程(亲测 + 总结)
Error: L6200E: Symbol keyflag multiply defined (by main.o and key.o).
读取写入文件内容
编写第一个myshell程序(上机实验报告二)