Thread: Date + one year
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Steve Steve is offline
external usenet poster
 
Posts: 97
Default Date + one year

YourDate+365 fails in a leap year.

You might try the Edate() function.

=Edate(ReferenceToYourDate,12)

If Edate() doesn't work for you, read the reference in Help.

If you want to write a macro, DateSerial is the key:

Function AddAYear(Yourdate As Date) As Date
AddAYear = DateSerial(Year(Yourdate) + 1, Month(Yourdate), Day(Yourdate))
End Function

Steve


"saziz" wrote in
message ...

considering your date 8/12/05 is written in a1
in b1 type this formula --- =a1+365
you will get 8/12/06
copy it down until where you want
Syed


--
saziz
------------------------------------------------------------------------
saziz's Profile:
http://www.excelforum.com/member.php...fo&userid=6350
View this thread: http://www.excelforum.com/showthread...hreadid=493623