Fortune Telling Collection - Comprehensive fortune-telling - Excuse me, how to set up a formula in Excel to calculate the date of birth with the ID number?

Excuse me, how to set up a formula in Excel to calculate the date of birth with the ID number?

Take the ID number in the Excel table: MID (text, start character, take the number of characters); 2. 15 digits The ID number from 7 to 12 digits is the date of birth and the year is 2 digits. The 7th to 4th18th ID number is the date of birth and the year is 4 digits. The purpose can be achieved by extracting the number representing the date of birth from the ID number and using the text function MID (). Mid()- Extracts a specified number of characters (from left to right) from a specified position. Judging whether an ID number is 15 digits or 18 digits can be done by means of the logical judgment function IF () and the character number calculation function LEN (). Based on the above analysis, the automatic extraction of the date of birth in the form of 1978- 12-24 can be completed by the following operations: If the ID number data is in the cell A 1, edit the formula = if (len (a1) = in the cell B 1. “-”& amp; MID(A 1, 9,2) and amp "-"&; MID(A 1,1,2), MID(A 1, 7,4) and amp "-"&; MID (A 1, 1 1,2)amp; “-”& amp; MID(A 1,13,2)) and press enter to confirm. If only "year-month" format is used, the formula can be modified to = if (len (a 1) = 15, mid (a 1, 7,2)&; “-”& amp; MID(A 1, 9,2), MID(A 1, 7,4) and amp "-"&; MID(A 1, 1 1,2))