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.