[Excel] extracts the date of birth, age, and gender information from the ID card number

Source: Internet
Author: User

Execl is powerful. Today, we will introduce how to extract the birth date, age, and gender information from the ID card number.

First paste the effect:

Note 1: it is a coincidence that the ID card number is randomly entered ....

Edit procedure:

1. Column A is a user-Filled Column. the ID card number is more than 15 digits. Therefore, you must enter'

2. Column B is the user's age column, and the formula is used.

= Year (today ()-If (LEN (A1) = 15, concatenate ("19", mid (A1, 7,2), mid (A1, 7,4 ))

3. Column C is the user's date of birth column, and the formula is used.

= If (LEN (A1) = 15, text (concatenate ("19", mid (A1, 7,6), "#-00-00 "), text (mid (A1, 7,8), "#-00-00 "))

4. column D is the user gender column, and the formula is used.

= Year (today ()-If (LEN (A1) = 15, concatenate ("19", mid (A1, 7,2), mid (A1, 7,4 ))

NOTE 2: replace A1 with the corresponding cell in the formula.

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.