Thread: Dates
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
John C[_2_] John C[_2_] is offline
external usenet poster
 
Posts: 1,358
Default Dates

If you have the Analysis ToolPak add-in installed, you could shorten your
formula:
Assuming B4 has 25
=EDATE(A4,B4*12)

I am curious as to what is in B4, as if you are just adding 25 years to the
date in A4 (given as 1/31/2008), and B4 is 25 years, my excel comes up with
1/31/2033, not 12/10/2033. The advantage of the EDATE function also is it
does take into account leap years.
Your formula, with date of 2/29/2008 in A4, the result would be 3/1/2033,
the EDATE formula results in 2/28/2033. So it wholly depends on what your
desired response would be.

--
** John C **

"frykid50" wrote:

I have a date (1/31/08) and I need to add 25 years to it. I know the formula
to do this (=Date(YEAR(A4)+B4,MONTH(A4),DAY(A4)) where the answer is
12/10/2033. No problem. However, does this account for a leap year?