flushed with the success of being able to answer (poorly) an earlier question in this forum, here is my attempt at a formula which will count the number of whole months and append a fraction based on a 30 day month. changing the 30 to 100 would 'fake' the decimal to reflect the actual number of days
Code:
//assume the earlier date is called date1 and the later date is called date2
=((YEAR(date2)-YEAR(date1))*12)+MONTH(date2)-MONTH(date1) + ((DAY(DATE(YEAR(date1),MONTH(date1)+1,)) - DAY(date1) + DAY(date2))/30)
You could use YEARFRAC(Date1,Date2,Base)*12. Depending on rules (Date1=Date2 case, result 0 or 1) you can need Date1-1 instead of Date1. Base is an integer within 0-4, depending on calendar rules. You may need an Analysis Toolpak add-in installed.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.