+ Reply to Thread
Results 1 to 5 of 5

Date Management

  1. #1
    Nigel
    Guest

    Date Management

    Hi All
    What is the simplest way to determine from a DATE the prior month number?

    eg Using European Date format
    1/03/2005 would give 2 as the prior month
    10/01/2005 would give 12


    --
    Cheers
    Nigel





  2. #2
    Niek Otten
    Guest

    Re: Date Management

    =MONTH(DATE(YEAR(A1),MONTH(A1)-1,1))

    --

    Kind Regards,

    Niek Otten

    Microsoft MVP - Excel


    "Nigel" <[email protected]> wrote in message
    news:[email protected]...
    > Hi All
    > What is the simplest way to determine from a DATE the prior month number?
    >
    > eg Using European Date format
    > 1/03/2005 would give 2 as the prior month
    > 10/01/2005 would give 12
    >
    >
    > --
    > Cheers
    > Nigel
    >
    >
    >
    >




  3. #3
    K Dales
    Guest

    RE: Date Management

    Assuming the date you want to use is in A1, =IF(MONTH(A1)=1,12,MONTH(A1)-1)
    will do the trick.

    "Nigel" wrote:

    > Hi All
    > What is the simplest way to determine from a DATE the prior month number?
    >
    > eg Using European Date format
    > 1/03/2005 would give 2 as the prior month
    > 10/01/2005 would give 12
    >
    >
    > --
    > Cheers
    > Nigel
    >
    >
    >
    >
    >


  4. #4
    Ron Rosenfeld
    Guest

    Re: Date Management

    On Fri, 11 Mar 2005 13:41:18 -0000, "Nigel" <[email protected]>
    wrote:

    >Hi All
    >What is the simplest way to determine from a DATE the prior month number?
    >
    >eg Using European Date format
    >1/03/2005 would give 2 as the prior month
    >10/01/2005 would give 12


    With the date in A1 (as an Excel date; the format is irrelevant):

    =MONTH(A1-DAY(A1))

    should do it.


    --ron

  5. #5
    Nigel
    Guest

    Re: Date Management

    Thanks for the replies

    --
    Cheers
    Nigel



    "Ron Rosenfeld" <[email protected]> wrote in message
    news:[email protected]...
    > On Fri, 11 Mar 2005 13:41:18 -0000, "Nigel" <[email protected]>
    > wrote:
    >
    > >Hi All
    > >What is the simplest way to determine from a DATE the prior month number?
    > >
    > >eg Using European Date format
    > >1/03/2005 would give 2 as the prior month
    > >10/01/2005 would give 12

    >
    > With the date in A1 (as an Excel date; the format is irrelevant):
    >
    > =MONTH(A1-DAY(A1))
    >
    > should do it.
    >
    >
    > --ron




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1