Could someone please tell me how to modify this formula to calculate the number of months from one date to another?
=DATEDIF(A1,TODAY(),"m")
Regards Ken
Could someone please tell me how to modify this formula to calculate the number of months from one date to another?
=DATEDIF(A1,TODAY(),"m")
Regards Ken
Last edited by kengaroo; 04-29-2010 at 09:06 AM.
replace today() with an actual date
=DATEDIF(A1,B1,"m")
Yes, thank you. I meant to ask months and days. Is this possible?
Also, am I asking these questions in the right area?
Your help is very appreciated.
Regards Ken
Yes it is in the wrong spot, it should be in worksheet functions
Try This
=DATEDIF(A1,B1,"ym")&" months "&DATEDIF(A1,B1,"md")&" days"
Just curious as to why. The formula will return the correct result when using the TODAY() function.replace today() with an actual date
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
Did you place today's date in B1?
Yes. The formula works - however, as expected, it returns a result of - 0 month 0 days, but it does not error.
Of course if the period is over a year and you want to show a result like 15 months 11 days then the first DATEDIF should use 3rd argument of just "m", i.e.
=DATEDIF(A1,B1,"m")&" months "&DATEDIF(A1,B1,"md")&" days"
otherwise you never get greater than 11 months 30 days
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks