Excel identifies gender by ID number

Source: Internet
Author: User

Here's how we'll start today's tutorial:

① We start Excel, enter the name in the cell, ID number, and gender, we need to get the gender according to the ID number, enter the following formula in the Sex column, and then explain the formula later, so that we can understand it.

② formula Input and then press ENTER, the result is male, we look, ID card is 15, then it should look at the last 1 digits, 3, odd number, is male.

③ Mouse moved to the lower right corner of the cell, the + number appears, double click, automatically fill out the cell, control, the results are all correct.

Formula description

Left (b2,17) 18 ID number of the first 17 to extract, if it is 15 ID number directly extracted 15 digits, right (b2,17), 1 means the left function to extract the number of the last number of numbers extracted, Then in the MoD function the right function is extracted from the last number divided by 2, if it is odd, divided by 2 the remainder must be 1, even the remainder must be 0. Because 1=true,0=false, The use of the IF function to return the specified male and female values can be achieved through the identification number to determine gender.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.