Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I find age in years from anniversary date (Age funtion)?
I need to calculate age given birth-date.
First, I tried =YEAR(NOW())-YEAR(cell ref with birthday) This works, but (of course) the resulting year rolls-over on January 1, not on the actual birthday. I searched for "Age function" but (aside from Access) the closest I could find was: "How to calculate ages before 1/1/1900 in Excel" (Q245104) http://support.microsoft.com/kb/245104/en-us Well, I am not dealing with dates before 1900, but I tried it anyway (even though I could not believe I needed a VB script to do this) I created the VB script "AgeFunc" and then adapted the formula =AgeFunc(startdate,enddate) to =AgeFunc(YEAR(NOW()),YEAR(AE353)) Where AE353 is the cell reference with the birth-date. However, this returned the error #VALUE! This is such a basic function ... one of the first "functions" that toddlers understand ... how come I can't do this in Excel?!? Surely there is a built-in "AgeFunc" in Excel ... can anyone help?!? Thanks in advance |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I find age in years from anniversary date (Age funtion)?
=DATEDIF(start_date,end_date,"y")
http://www.cpearson.com/excel/datedif.aspx -- David Biddulph "Enquire" wrote in message ... I need to calculate age given birth-date. First, I tried =YEAR(NOW())-YEAR(cell ref with birthday) This works, but (of course) the resulting year rolls-over on January 1, not on the actual birthday. I searched for "Age function" but (aside from Access) the closest I could find was: "How to calculate ages before 1/1/1900 in Excel" (Q245104) http://support.microsoft.com/kb/245104/en-us Well, I am not dealing with dates before 1900, but I tried it anyway (even though I could not believe I needed a VB script to do this) I created the VB script "AgeFunc" and then adapted the formula =AgeFunc(startdate,enddate) to =AgeFunc(YEAR(NOW()),YEAR(AE353)) Where AE353 is the cell reference with the birth-date. However, this returned the error #VALUE! This is such a basic function ... one of the first "functions" that toddlers understand ... how come I can't do this in Excel?!? Surely there is a built-in "AgeFunc" in Excel ... can anyone help?!? Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date range selection? Anniversary dates | Excel Worksheet Functions | |||
Anniversary of a date | Excel Discussion (Misc queries) | |||
formula to display anniversary date | Excel Worksheet Functions | |||
calculate anniversary of date after specified date | Excel Worksheet Functions | |||
How do I get an anniversary date? | Excel Worksheet Functions |