Thread: VBA functions
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Robert Martim, Excel Robert Martim, Excel is offline
external usenet poster
 
Posts: 20
Default VBA functions

Natalia

You can do as follows:

Your_EDATE=DATE(YEAR(Date),MONTH(Date)+N_Months,DA Y(Date))

Where "N_Months" is the number of months ahead, so it is 5 it will give the
date in 5 months' time. And:

Your_EOMONTH =DATE(YEAR(Date),MONTH(Date)+(N_Months+1),0)

Where "N_Months" is the number of months ahead, so if it is 5 it will give
the end of month in 5 months' time.

--
Robert
Author of RibbonX: Customizing the Office 2007 Ribbon:
LATEST INTERACTIVE TUTORIAL:
http://www.msofficegurus.com/videos/...p_HT_Chart.asp
FORUM: http://www.msofficegurus.com/forum/