Calculate age excel

cellofan -  
hmcirta Posted messages 249 Registration date   Status Member Last intervention   -
Hello,
I want to calculate a person's age from their social security number (the year of birth corresponds to the 3rd and 4th digits of the social security number).
Thank you for your help,
Antoine
Configuration: Windows XP Internet Explorer 7.0

4 answers

gbinforme Posted messages 14930 Registration date   Status Contributor Last intervention   4 744
 
Hello

With your INSEE code in A1, here’s a formula
=(TODAY()-DATE(MID(A1,2,2),MID(A1,4,2),1))/365.25

--

Knowledge is the only material that increases when shared. (Socrates)
4
hmcirta Posted messages 249 Registration date   Status Member Last intervention   23
 
Hello

If cell A2 contains the INSEE number, you can put in cell B2 =19&MID(A2,3,2) and then in cell C2 =2008-B2

Best regards
--

What is the use of knowledge if it is not shared
0
hmcirta Posted messages 249 Registration date   Status Member Last intervention   23
 
Hello gbinforme

I might be mistaken, but according to your formula, someone born in 1974 would be 87 years old and a bit more today.

You might have meant:
=(TODAY()-DATE(MID(A3,3,2),1,1))/365.25

But there will always be those extra bits
--

What is the purpose of knowledge if it is not shared?
0
gbinforme Posted messages 14930 Registration date   Status Contributor Last intervention   4 744
 
Hello

INSEE number (the year of birth corresponds to the 3rd and 4th digits of the INSEE number).

I may be wrong...

It seems to me because, contrary to what the question says, the INSEE number is composed like this and I also took the month:
 1 gender: 1 for males, 2 for females 1 or 2 2 and 3 last two digits of the year of birth from 00 to 99 4 and 5 month of birth from 01 to 12, or 20 6 and 7 metropolitan birth department from 01 to 95 8, 9 and 10 order number of the municipality of birth in the department 11, 12 and 13 order number of the birth certificate in the month of the municipality 14 and 15 control key modulo 97 from 01 to 97


To be born in 1974, you need a number 17401... and not 1974...!
and therefore:

=(TODAY()-DATE(MID(A1;2;2);MID(A1;4;2);1))/365.25

we take the 2nd and 3rd for the year and the 4th and 5th for the month
--

Knowledge is the only thing that increases when shared. (Socrates)
0
hmcirta Posted messages 249 Registration date   Status Member Last intervention   23
 
Hello

I just followed the question;

I quote:
I want to calculate a person's age from their social security number (the year of birth corresponds to the 3rd and 4th digits of the social security number).

Since I'm not from the country, I don't know this social security number. So I apologize for not being informed

--

What is the use of knowledge if it is not shared?
0