+ Reply to Thread
Results 1 to 6 of 6

Date functions-enter a formulae that will calculate the current month

  1. #1
    Registered User
    Join Date
    10-11-2006
    Posts
    11

    Exclamation Date functions-enter a formulae that will calculate the current month

    Hello please can anyone help with this:

    I would like to enter a formulae that will calculate the current month i.e. December 08 and then also Calculate the previous month and year and enter the results in the same cell in a format such as this:

    December 08 v December 07

    can anyone suggest any ideas pls.
    Michelle

  2. #2
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421
    I couldnt find anything that would segregate just the monthly text from a date....so here is my solution.

    I have the twelve months listed and numbered. You can use the
    Please Login or Register  to view this content.
    command to identify the current months number...and use that in a vlookup against the twelve month listed database so you get the desired text. Tweak it a bit to get the formula I have in cell A1
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Try:

    =TEXT(TODAY(),"mmmm yy") & " v " & TEXT(DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY()),"mmmm yy")

    HTH

    Jason

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    and i went for
    =TEXT(TODAY(),"mmmm yyyy") &" v "&CHOOSE(MONTH(EDATE(NOW(),-1)),"jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec")&" "&YEAR(EDATE(NOW(),-1))

  5. #5
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421
    Quote Originally Posted by martindwilson View Post
    and i went for
    =TEXT(TODAY(),"mmmm yyyy") &" v "&CHOOSE(MONTH(EDATE(NOW(),-1)),"jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec")&" "&YEAR(EDATE(NOW(),-1))
    Just an FYI on the EDATE formula....(Per the Excel Help)

    If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.

    How?

    On the Tools menu, click Add-Ins.
    In the Add-Ins available list, select the Analysis ToolPak box, and then click OK.
    If necessary, follow the instructions in the setup program.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    just realised that mine wont work as i forgot its january ! but in febuary it would return 2009! oops
    so
    =TEXT(TODAY(),"mmmm yyyy")&" v "&CHOOSE(MONTH(NOW()),"jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec")&" "&YEAR(NOW())-1
    Last edited by martindwilson; 01-19-2009 at 12:29 PM.

+ 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