how about:
fraction to the LASTMONT ( days in EndDate Month)
On Wed, Jul 13, 2011 at 9:28 AM, Dave Bonallack
wrote:
> Hi,
> Fractions of a month are a bit subjective. Fractions of WHICH month, needs
> to be decided. Fractions of a 28-day month? 29- 30- or 31- day month? Or
> maybe a standardize
Hi,
Fractions of a month are a bit subjective. Fractions of WHICH month, needs to
be decided. Fractions of a 28-day month? 29- 30- or 31- day month? Or maybe a
standardized 30.4375-day month?
Regards - Dave
On 12/07/2011, at 8:55 PM, Richard wrote:
> Hi All,
> I would appreciate a vba function
Try this Function to get Desire OutPut
Function GetDiff(Startdate As Range, EndDate As Range) As Single
GetDiff = DateDiff("m", CDate(Startdate), CDate(EndDate)) +
(Day(CDate(EndDate)) / Day(DateSerial(Year(CDate(EndDate)),
Month(CDate(EndDate)) + 1, 0)))
End Function
On Tue, Jul 12, 2011 at 11:
Function MonthFrac(StartDate As Date, EndDate As Date) As Single
*'= siti Vi / Jakarta 12 July 2011*
Dim YY1 As Integer, MM1 As Integer, DD1 As Integer
Dim YY2 As Integer, MM2 As Integer, DD2 As Integer
Dim MM As Integer, DD As Integer, EndMonthDays As Integer
YY1 = Year(StartD
Hi All,
I would appreciate a vba function that will calculation the number of months
and fraction of a month between 2 dates.
i.e.
January 1, 2011 to February 14, 2011 would be 1.5 months
January 1, 2011 to February 15, 2011 would be 1.5335714
January 1, 2011 to March 15, 2011 would be 2.483871