Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to substract a date in excel to 2000
I want to get exact date (day/month/year) of a person as to when he will be
21 years of age in excel to 2000 eg. My birthdate is 12/12/1972 - 12/12/1993 = 21 years the output should be in years as shown in eg. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to substract a date in excel to 2000
function years21(birthdate as date) as string
on error goto error_line dim newdate as date newdate = dateserial(year(birthdate)+21,month(birthdate),day (birthdate)) years21="My birthdate is " & _ format(birthdate,""dd/mm/yyyy") & " - " & _ format(newdate,""dd/mm/yyyy") & " = 21 years" exit function error_line: years21="Error" end function -- Hope this helps Martin Fishlock Please do not forget to rate this reply. "ram" wrote: I want to get exact date (day/month/year) of a person as to when he will be 21 years of age in excel to 2000 eg. My birthdate is 12/12/1972 - 12/12/1993 = 21 years the output should be in years as shown in eg. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2000 and date math | Excel Discussion (Misc queries) | |||
What date is7 days from given date in Excel 2000 | Excel Discussion (Misc queries) | |||
need held for auto date calculation for adding years and substract | New Users to Excel | |||
How do I substract numbers in range like this: Substract(a1..a10) | New Users to Excel | |||
how do i substract in microsoft excel? | Excel Worksheet Functions |