ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Age in years only (https://www.excelbanter.com/excel-discussion-misc-queries/115786-age-years-only.html)

Jamie

Age in years only
 
I need a formula that will just return age in years from a given birthdate. I
have tried using =DATEDIF(A1,TODAY(),"y") but if I do not insert a birthdate
then the formula returns 106
--
Jamie

Dave Peterson

Age in years only
 
=if(a1="","",datedif(....))



Jamie wrote:

I need a formula that will just return age in years from a given birthdate. I
have tried using =DATEDIF(A1,TODAY(),"y") but if I do not insert a birthdate
then the formula returns 106
--
Jamie


--

Dave Peterson

Dave F

Age in years only
 
A blank cell is treated as 1/1/1900 which is 106 years ago.

If you want a blank returned, you could do something like
=IF(ISBLANK(A1),"",DATEDIF(A1,TODAY(),"y"))

Dave
--
Brevity is the soul of wit.


"Jamie" wrote:

I need a formula that will just return age in years from a given birthdate. I
have tried using =DATEDIF(A1,TODAY(),"y") but if I do not insert a birthdate
then the formula returns 106
--
Jamie


smw226 via OfficeKB.com

Age in years only
 
Hi Jamie,

This would also work

=IF(A1="","",YEAR(TODAY())-YEAR(A1))

HTH

Simon

Jamie wrote:
I need a formula that will just return age in years from a given birthdate. I
have tried using =DATEDIF(A1,TODAY(),"y") but if I do not insert a birthdate
then the formula returns 106


--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via http://www.officekb.com



All times are GMT +1. The time now is 06:03 AM.

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