How to extract and calculate age with ID number in Excel?

How to extract and calculate age with ID number in Excel?

Table of contents

How to extract and calculate age with ID number in Excel?

1. Enter the formula [=DATEDIF(TEXT(MID(C2,7,8), "00-00-00"), TODAY(), "y")] in cell D2 of age

 2. The MID (C2, 7, 8) function means to use the MID function to extract the seventh digit of the ID number in cell C2, and extract 8 digits, "00-00-00" is the format of the extraction time

3. The TEXT function is to apply the MID function text format as a time function

4. TODAY() is to calculate the age cut-off date as today, and the "y" function indicates the year

5. For the age of other cells, place the mouse on the lower right corner of the cell to become a cross shape, and double-click the right mouse button to complete it automatically.


1. Enter the formula [=DATEDIF(TEXT(MID(C2,7,8), "00-00-00"), TODAY(), "y")] in cell D2 of age

 2. The MID (C2, 7, 8) function means to use the MID function to extract the seventh digit of the ID number in cell C2, and extract 8 digits, "00-00-00" is the format of the extraction time

3. The TEXT function is to apply the MID function text format as a time function

4. TODAY() is to calculate the age cut-off date as today, and the "y" function indicates the year

5. For the age of other cells, place the mouse on the lower right corner of the cell to become a cross shape, and double-click the right mouse button to complete it automatically.

Remember to like and collect if you like it!


Amway, an excellent blogger of R language and his CSDN column:
blogger blog address:

Data+Science+Insight's blog_CSDN blog-R language from entry to machine learning, data science from 0 to 1, machine learning interview + sweeping thousands of army field bloggers

statistics.insight's blog_CSDN blog-R language introductory course, ggplot2 and its extension package visualization combat series (continuously updated), blogger in the field of continuous learning of data science

The blogger is a well-known blogger in the field of CSDN data science (blog content includes: data science from 0 to 1, R language from entry to machine learning, machine learning interview + sweeping the army, efficient reuse of Python programming skills, etc.) Graduated from China in Intelligent Computing, Academy of Sciences University. His research interests include data mining, machine learning, and deep learning. In-depth participation in a number of data mining, computer vision and natural language processing related projects, such as social computing, anomaly analysis, cluster analysis, predictive analysis, sequence labeling, language generation, OCR, image classification + detection + segmentation, etc. He is currently a data scientist in Mao, responsible for the management of the data science team and project implementation. Worked in China Xinke Group, responsible for the management and project implementation of the big data and machine learning group. Participated in the development and construction of a national medical big data platform machine learning project, built a complete data link, feature pool, model warehouse, migration center, data application, data service pipeline, and cooperated with AWS China to develop based on AWS cloud services Large-scale industrial Internet projects have accumulated practical experience in industrial Internet model construction, deployment, and monitoring.

Microsoft Excel is a spreadsheet software written by Microsoft for computers using Windows and Apple Macintosh operating systems. An intuitive interface, excellent calculation functions and charting tools, coupled with successful marketing, make Excel the most popular personal computer data processing software. In 1993, after the release of version 5.0 as a component of Microsoft Office, Excel began to become the overlord of the spreadsheet software on the applicable operating platform.

In Excel, a function is actually a predefined specific calculation formula. One or more parameters are calculated according to this specific calculation formula, and one or more calculation results are obtained, which are called function values. Using these functions can not only complete many complex calculations, but also simplify the complexity of formulas.

The world we live in is rich and colorful, and almost all knowledge comes from vision. May not be able to remember a string of numbers, and the relationships and trends between them. But it's easy to remember a picture or a curve. Therefore, by using charts, it will make the worksheet prepared in Excel easier to understand and communicate

Guess you like

Origin blog.csdn.net/weixin_57242009/article/details/129418225