ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I calculate the age of a person from their ID no.? (https://www.excelbanter.com/excel-programming/429128-how-do-i-calculate-age-person-their-id-no.html)

Tracey

How do I calculate the age of a person from their ID no.?
 
I have a work sheet which provides the ID number of a person (the first 6
digits are the birth date of the person YYMMDD). Another column requests
age. How can I create a formula that will automatically calculate the age of
the person as at the current date?

Ron Rosenfeld

How do I calculate the age of a person from their ID no.?
 
On Fri, 29 May 2009 04:18:01 -0700, Tracey
wrote:

I have a work sheet which provides the ID number of a person (the first 6
digits are the birth date of the person YYMMDD). Another column requests
age. How can I create a formula that will automatically calculate the age of
the person as at the current date?


Ah, your question brings to mind the Year 2000 problem, which was due in part
to the custom of using only two digits to specify a year.

If no one was born in this century, then:

=DATEDIF(DATE(LEFT(A1,2),MID(A1,3,2),MID(A1,5,2)), TODAY(),"y")

But that may only be true for an unknown number of years, so you are going to
have to supply the possible age range for your persons in order to devise a
formula that will continue to work for the foreseeable future, or change your
ID's to use four digit years.
--ron


All times are GMT +1. The time now is 02:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com