Tags: datedif, dates, display, excel, microsoft, msdn, number, related, return, software, subtract, whne

I want to subtract 2 dates and display the result as months

On Microsoft » Microsoft Excel

2,544 words with 3 Comments; publish: Wed, 04 Jun 2008 12:29:00 GMT; (30678.13, « »)

I am trying to subtract 2 dates and return the result as number of months.

I have seen post related to DateDif but whne I use this I get a Name error.

How do I subtract dates and get number of months?

Thanks

Dave

All Comments

Leave a comment...

  • 3 Comments
    • Dave

      =DATEDIF(A1,B1,"m")

      Works for me

      --

      HTH

      Nick Hodge

      Microsoft MVP - Excel

      Southampton, England

      nick_hodgeTAKETHISOUT.excel.todaysummary.com.zen.co.uk.ANDTHIS

      "Dave" <davekstl.excel.todaysummary.com.charter.net> wrote in message

      news:_D8Ld.28058$K07.26096.excel.todaysummary.com.fe07.lga...

      >I am trying to subtract 2 dates and return the result as number of months.

      > I have seen post related to DateDif but whne I use this I get a Name

      > error.

      > How do I subtract dates and get number of months?

      > Thanks

      > Dave

      >

      #1; Wed, 04 Jun 2008 12:30:00 GMT
    • Start date in A1,

      End date in B1,

      Try this:

      =DATEDIF(A1,B1,"m")

      For an explanation of the function, check out Chip Pearson's web page:

      http://www.cpearson.com/excel/datedif.htm

      --

      HTH,

      RD

      ----

      Please keep all correspondence within the NewsGroup, so all may benefit !

      ----

      "Dave" <davekstl.excel.todaysummary.com.charter.net> wrote in message

      news:_D8Ld.28058$K07.26096.excel.todaysummary.com.fe07.lga...

      > I am trying to subtract 2 dates and return the result as number of months.

      > I have seen post related to DateDif but whne I use this I get a Name

      error.

      > How do I subtract dates and get number of months?

      > Thanks

      > Dave

      >

      #2; Wed, 04 Jun 2008 12:31:00 GMT
    • Thank you both - this works!

      "Ragdyer" <RagDyer.excel.todaysummary.com.cutoutmsn.com> wrote in message

      news:OoV1eCvBFHA.2316.excel.todaysummary.com.TK2MSFTNGP15.phx.gbl...

      > Start date in A1,

      > End date in B1,

      > Try this:

      > =DATEDIF(A1,B1,"m")

      > For an explanation of the function, check out Chip Pearson's web page:

      > http://www.cpearson.com/excel/datedif.htm

      > --

      > HTH,

      > RD

      > ----

      > Please keep all correspondence within the NewsGroup, so all may benefit !

      > ----

      > "Dave" <davekstl.excel.todaysummary.com.charter.net> wrote in message

      > news:_D8Ld.28058$K07.26096.excel.todaysummary.com.fe07.lga...

      >> I am trying to subtract 2 dates and return the result as number of

      >> months.

      >> I have seen post related to DateDif but whne I use this I get a Name

      > error.

      >> How do I subtract dates and get number of months?

      >> Thanks

      >> Dave

      >>

      >

      #3; Wed, 04 Jun 2008 12:32:00 GMT