View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
UglyChicken UglyChicken is offline
external usenet poster
 
Posts: 10
Default Date Computation

On Nov 21, 7:07*am, sylink wrote:
I need a macro to determine dates using 6-month frequency. To
illustrate, I have these dates:

Given:
Input Date = 12-Feb-2008
Maturity Date = 20-Dec-2011

Required:
Last Coupon Date = ?
Next Coupon Date =?

Manual Computation
Last Coupon Date(6-month freq) = 20-Dec-2007 (Must have same day and
month as the matuirty date above.e.g20-Dec;and year nearest to input
date e.g 2007)

Next Coupon Date = 20-May-2008 (6 months from last coupon
date;date-20th must remain unchanged)


Where cell A1 holds the date:
=DATE(YEAR(A1),MONTH(A1)+6,DAY(20))
(untested)