+ Reply to Thread
Results 1 to 5 of 5

Thread: subtracting month

  1. #1
    Registered User
    Join Date
    08-27-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    26

    subtracting month

    Hi All,

    Can anyone help me how to substract a date (month).
    e.g i have cell A1 = August. How to get in another cell, i.e B1= July,
    which is the month before. (Without using lookup to another database)
    Really appreciate your help

    Cheers,
    Miners
    Last edited by NBVC; 08-28-2009 at 07:57 AM.

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    re: subtracting month

    Do you have the text "August" or a date formatted to month as mmmm?

    if the latter, try =TEXT(DATE(2009,MONTH((H3&" 1, 2009")+0)-1,1),"mmmm") where H3 contains the word "August"...

    if the former: =DATE(YEAR(H3),MONTH(H3)-1,1) formatted as mmmm
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    08-27-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: subtracting month

    You're the best NBVC, thanks

  4. #4
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: subtracting month

    I know this is resolved, just demo'ing something daddylonglegs showed me which is quite neat, ie this element:

    MONTH((A1&" 1, 2009")+0)-1
    can be shortened to

    MONTH(1&A1)-1

  5. #5
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: subtracting month

    Thanks for that DonkeyOte....

    I actually never have entered a date as 1August to get 1st August 2009... very neat! Of course, to be expected from the daddy
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ 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.2.0