+ Reply to Thread
Results 1 to 3 of 3

Convert month to number and subtract one

Hybrid View

  1. #1
    Deeds
    Guest

    Convert month to number and subtract one

    I have a date in cell A1 of December 1, 2005. I do a =text(A1) and it
    returns December. I want to now get November, October in other cells based
    off of the December cell. How can I subtract from December to get November?
    Thanks in advance

  2. #2
    Niek Otten
    Guest

    Re: Convert month to number and subtract one

    I assume you have =TEXT(A1,"mmmm")

    For November:
    =TEXT(DATE(1,MONTH(A1)-1,1),"mmmm")
    For October:
    =TEXT(DATE(1,MONTH(A1)-2,1),"mmmm")

    etc

    --
    Kind regards,

    Niek Otten

    "Deeds" <Deeds@discussions.microsoft.com> wrote in message
    news:0EC4BAA7-AC6C-4C1D-9DD6-A829F7733375@microsoft.com...
    >I have a date in cell A1 of December 1, 2005. I do a =text(A1) and it
    > returns December. I want to now get November, October in other cells
    > based
    > off of the December cell. How can I subtract from December to get
    > November?
    > Thanks in advance




  3. #3
    Niek Otten
    Guest

    Re: Convert month to number and subtract one

    Better make that

    =TEXT(DATE(2,MONTH(A1)-1,1),"mmmm")

    etc

    --
    Kind regards,

    Niek Otten


    "Niek Otten" <nicolaus@xs4all.nl> wrote in message
    news:uLhT3X49FHA.2676@TK2MSFTNGP15.phx.gbl...
    >I assume you have =TEXT(A1,"mmmm")
    >
    > For November:
    > =TEXT(DATE(1,MONTH(A1)-1,1),"mmmm")
    > For October:
    > =TEXT(DATE(1,MONTH(A1)-2,1),"mmmm")
    >
    > etc
    >
    > --
    > Kind regards,
    >
    > Niek Otten
    >
    > "Deeds" <Deeds@discussions.microsoft.com> wrote in message
    > news:0EC4BAA7-AC6C-4C1D-9DD6-A829F7733375@microsoft.com...
    >>I have a date in cell A1 of December 1, 2005. I do a =text(A1) and it
    >> returns December. I want to now get November, October in other cells
    >> based
    >> off of the December cell. How can I subtract from December to get
    >> November?
    >> Thanks in advance

    >
    >




+ 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