Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Function datEOM(datStartDate As Date, intNumMonths As Integer) As Date
Dim intIncrementYear As Integer Dim intYear As Integer Dim intMonth As Integer intIncrementYear = Int((Month(datStartDate) + intNumMonths) / 12) intYear = Year(datStartDate) + intIncrementYear intMonth = Month(datStartDate) + intNumMonths + 1 If intMonth 12 Then intMonth = intMonth Mod 12 datEOM = DateSerial(intYear, intMonth, 1) - 1 End Function -- Dianne Hande & Tolga wrote: We need to set the date of the month-end to a varaiable. This function exists in excel EOMONTH but could not achieve that in VB. We would like to know if there is such a fuction or could be achieved with something else. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formula to calculate month-month | Excel Discussion (Misc queries) | |||
Trying to get a Boolean formula to work month-to-month | Excel Discussion (Misc queries) | |||
Function or formula to convert "text" month to number of month? | Excel Discussion (Misc queries) | |||
Function or formula to convert "text" month to number of month? | Excel Discussion (Misc queries) | |||
Function or formula to convert "text" month to number of month | Excel Discussion (Misc queries) |