+ Reply to Thread
Results 1 to 3 of 3

displaying months from cells as their text (not numerical)

Hybrid View

  1. #1
    Registered User
    Join Date
    04-05-2009
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    71

    displaying months from cells as their text (not numerical)

    G'Day,

    Please refer to the attached screenshot of my working spreadsheet for help.

    Please avert your attention to line 86 (month2). The formula contained within these cells equals =MONTH(C84) [the date 2 cells above it]... to which I've formatted the cell to "mmmm" and it displays "January" across the board. Can anyone explain why this is occuring and how I can fix it please? I'm aiming to graph this information and can't accurately do it using the moving monthly system i've put in place if I can't change the months dynamically like this.

    Secondly, and on a side note. Line 84 currently takes todays date (not currently todays date in the example screenshot) (=TODAY()), and to get to the previous 13 months I deduct 31 days. I can foresee this as being a problem further down the track especially when leap years come into play. Is there a function in Excel where I can simply deduct 1 month from another? =MONTH(C84)-1 ?
    Attached Images Attached Images
    Last edited by Xtopher; 10-14-2009 at 07:58 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,702

    Re: displaying months from cells as their text (not numerical)

    When you use MONTH function that returns a number 1 to 12. When you format that number as mmmm it reads the number as the number of days from 1st Jan 1900 (that's where Excel begins counting dates). As all the numbers 1 to 12 represent dates in January 1900 you always get January.

    For display of the correct month use just

    =C84

    and format as "mmmm" (although the underlying value is still a date it displays as the month) or use this formula to extract the month as text

    =TEXT(C84,"mmmm")

  3. #3
    Registered User
    Join Date
    04-05-2009
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    71

    Re: displaying months from cells as their text (not numerical)

    Legendary!

    Thank you daddylonglegs!

+ 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