I need to identify in VBA how many days before the a date of birth considering therefore only the day and month of the date of birth
e.g
now() = 14/04/2013
DateOfB = 20/04/1984
6 days
Many thanks
I need to identify in VBA how many days before the a date of birth considering therefore only the day and month of the date of birth
e.g
now() = 14/04/2013
DateOfB = 20/04/1984
6 days
Many thanks
If your DoB is in A1, try this...
=TODAY()-DATE(YEAR(TODAY()),MONTH(A1),DAY(A1))
Note:
1. now() will give you date AND time, so you only need to use =today() (which is 12/04/2013, not 14/04/2013)
2. The formula is based on the USA date system of mm/dd/yy, so you *may* need to swap things around a bit
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks