Method to extract age from ID number
The first step is to put the person’s ID number in The same column of the spreadsheet and create the corresponding header.
The second step is to use Excel functions to generate data. First, create a function at the corresponding position of the first person.
Generate real-time updated age. As shown in the picture, enter "=YEAR(TODAY())-MID(B2,7,4)" in cell C3 (enter the content in the quotation marks, no quotation marks are required, the same below). Note that the first two alphanumeric characters in the parentheses after the MID point to the cell where the ID card is located, so no mistakes can be made.
After completion, press Enter to generate the age, and the age calculated in this way will be automatically updated according to the date. If it is opened next year, it will be updated to next year's age.
The above is the detailed content of How to extract age from ID number. For more information, please follow other related articles on the PHP Chinese website!