ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   formula telling me if person is 19 or older today (https://www.excelbanter.com/excel-discussion-misc-queries/148482-formula-telling-me-if-person-19-older-today.html)

Kelley

formula telling me if person is 19 or older today
 
I need a formula to tell me if a person turned 19 today or is older than 19
based on dob. Excel 2000. thank you.

T. Valko

formula telling me if person is 19 or older today
 
Try this:

=DATEDIF(dob,TODAY(),"y")

Biff

"kelley" wrote in message
...
I need a formula to tell me if a person turned 19 today or is older than 19
based on dob. Excel 2000. thank you.




Rick Rothstein \(MVP - VB\)

formula telling me if person is 19 or older today
 
I need a formula to tell me if a person turned 19 today or is
older than 19 based on dob. Excel 2000. thank you.


Is this what you were after?

=IF(A1=DATE(YEAR(NOW())-19,MONTH(NOW()),DAY(NOW())),"Born
today",IF(A1<DATE(YEAR(NOW())-19,MONTH(NOW()),DAY(NOW())),"Older than
19","Too young"))

where I have assumed the date of birth is in A1.

Rick


Kelley

formula telling me if person is 19 or older today
 
Congratulations, you have come closer than anyone. Thank you. For some
reason, the first few months of the birthday year and a few days after the
19th birthday, compute incorrectly. This is the closest I have come, though.

"Rick Rothstein (MVP - VB)" wrote:

I need a formula to tell me if a person turned 19 today or is
older than 19 based on dob. Excel 2000. thank you.


Is this what you were after?

=IF(A1=DATE(YEAR(NOW())-19,MONTH(NOW()),DAY(NOW())),"Born
today",IF(A1<DATE(YEAR(NOW())-19,MONTH(NOW()),DAY(NOW())),"Older than
19","Too young"))

where I have assumed the date of birth is in A1.

Rick



Rick Rothstein \(MVP - VB\)

formula telling me if person is 19 or older today
 
Congratulations, you have come closer than anyone. Thank you. For some
reason, the first few months of the birthday year and a few days after the
19th birthday, compute incorrectly. This is the closest I have come,
though.


Can you post a couple of examples where this is the case so that I can track
down where the problem is?

Rick


bj

formula telling me if person is 19 or older today
 
verify the format of the date in A1 is as you expect it to be
=day(A1)
=Month(A1)
I have had data I though was MM/DD/YY which was really DD/MM/YY

"kelley" wrote:

Congratulations, you have come closer than anyone. Thank you. For some
reason, the first few months of the birthday year and a few days after the
19th birthday, compute incorrectly. This is the closest I have come, though.

"Rick Rothstein (MVP - VB)" wrote:

I need a formula to tell me if a person turned 19 today or is
older than 19 based on dob. Excel 2000. thank you.


Is this what you were after?

=IF(A1=DATE(YEAR(NOW())-19,MONTH(NOW()),DAY(NOW())),"Born
today",IF(A1<DATE(YEAR(NOW())-19,MONTH(NOW()),DAY(NOW())),"Older than
19","Too young"))

where I have assumed the date of birth is in A1.

Rick




All times are GMT +1. The time now is 07:54 AM.

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