Excel Formula Needed, Please

  Jackcoms 15:22 15 Sep 2005

I have two dates. Let's say 18 October 2005 and 18 August 2010.

I want a simple formula that will tell me how many calendar months there are between these two dates.

Yes, I know I could do it in my head, but I need to do it in Excel. :-)

Anyone help me please?

  pj123 15:45 15 Sep 2005

Unfortunately, I don't think I will be here in 2010 but I am sure that Vog will come up with the answer.

  Jackcoms 15:47 15 Sep 2005


Yes, I was rather hoping that Vog might be around. ;-)

  scotty 16:15 15 Sep 2005


A4 and A3 are the cells containing the two dates to be compared.

This works in Excel 2003. I do not recall these functions in earlier versions so not sure if it will work on older versions.

  Jackcoms 16:25 15 Sep 2005

It worked (Excel 2002)!!

Thanks very much. :-))

  pj123 16:32 15 Sep 2005

scotty, just tried it in Excel 2000 and got 59 so looks good to me.

  Jackcoms 16:39 15 Sep 2005

Oddly enough, using my above dates, I got 58.

But that's good enough for my purpose

  VoG II 15:19 16 Sep 2005

For future reference


where A1 is the first date and B1 is the second.

  scotty 15:39 16 Sep 2005

Grrr!! VoG is such a pain, he always has a better way!!

No, seriously, this is an excellent formula and you can replace m with d or y to get days or years. However, when I read VoG's suggestion I looked for this function in Excel but I cannot find it listed. Why is this hidden and how do I see such undocumented functions?

  VoG II 15:47 16 Sep 2005

DATEDIF and other date and time calculations are covered click here

click here

click here

Peter Noneley's Excel Function Dictionary click here right at the bottom of the page.

  scotty 15:55 16 Sep 2005

Ah - the second link explains the lack of documentation. Thanks for that VoG.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

iMac Pro review

See iconic duo Smith and Foulkes' epic animation for the BBC's Winter Olympics coverage

iMac Pro review

Idées cadeaux pour geeks et tech addicts