+ Reply to Thread
Results 1 to 15 of 15

Excel 2007 : How to convert month number to month name

  1. #1
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Post How to convert month number to month name

    I am trying to add a dynamic date rang to the heading of a table. I can find the earliest and latest dates, and want to concatenate them in the heading...

    January 1 2012 to January 31 2012

    The day and year (and the other bits) are easy, but is there an easy way to convert 1 to January, without going through a vlookup
    Last edited by FDibbins; 02-16-2012 at 09:18 PM. Reason: Figured it out
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  2. #2
    Registered User
    Join Date
    12-18-2012
    Location
    Bellingham, WA
    MS-Off Ver
    Excel 2013
    Posts
    9

    Arrow Re: Excel 2007 : How to convert month number to month name

    I have the same question that you had. You solved your issue but did not tell us how. Can you share?

  3. #3
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Excel 2007 : How to convert month number to month name

    HTScott, Godd afternoon.

    Try to use:

    Suppose the month number is at B4 cell.

    =TEXT(MONTH(B4),"mmmm")


    Please, tell us if it worked for you.

    Have a nice day.
    ...If my answer helped you, Please, click on. * Add Reputation (at left)

    Best regards.
    Marc?lio Lob?o

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Excel 2007 : How to convert month number to month name

    The only way that I have been able to do it without a VLOOKUP is to use LOOKUP. The date is in B2:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Another way, that I just found with a date in B2.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you have a number in B2:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 05-14-2013 at 03:01 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Excel 2007 : How to convert month number to month name

    wow I posted that over a year ago, sorry for not posting whatever solution I had, way back when, but it seems the others have offered you some suggestions

    For future reference, please start a new thread instead of "tagging" your question onto some1 elses thread (I know, this particular instance is in the grey areas seeing as you were asking what my solution was)

  6. #6
    Registered User
    Join Date
    12-18-2012
    Location
    Bellingham, WA
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Excel 2007 : How to convert month number to month name

    Mazzaropi, your solution did not work. 1 thru 12 all come up with "January". This is because the =MONTH function only works with a valid Excel Date/Time Code Serial Number. For example, the number 41586 is the serial number for 11/8/2013.

    Newdoverman, your =LOOKUP and =TEXT solutions did not work, however, your =CHOOSE solution did. It is rather long to get a simple answer.

    Since the =TEXT function allows you to format, I workded and came up with:

    =TEXT(DATE(2013,B2,1),"mmmm")

    I just used 2013 for the year and set the day to 1. Since they are not in the formatting I wanted, any year and day would work.

    Thanks again for your help.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Excel 2007 : How to convert month number to month name

    HTScott, what problem are you having as it appears to not be the question that I was responding to?

    If done according to the conditions that I outlined for B2 the formulae do work so, I don't know what you are doing.
    Last edited by newdoverman; 05-16-2013 at 09:34 AM.

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: How to convert month number to month name

    If B2 contains month number try this formula

    =TEXT(B2*29,"mmmm")
    Audere est facere

  9. #9
    Registered User
    Join Date
    12-18-2012
    Location
    Bellingham, WA
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Excel 2007 : How to convert month number to month name

    It may be the difference between Excel 2007 and 2010. Thanks

  10. #10
    Registered User
    Join Date
    12-18-2012
    Location
    Bellingham, WA
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: How to convert month number to month name

    daddylonglegs, your solution is the best. So simple and works great. Thanks

  11. #11
    Registered User
    Join Date
    04-07-2014
    Location
    Port-au-Prince, Haiti
    MS-Off Ver
    Excel 2007
    Posts
    5

    Cool Re: How to convert month number to month name

    Quote Originally Posted by FDibbins View Post
    I am trying to add a dynamic date rang to the heading of a table. I can find the earliest and latest dates, and want to concatenate them in the heading...

    January 1 2012 to January 31 2012

    The day and year (and the other bits) are easy, but is there an easy way to convert 1 to January, without going through a vlookup
    Try to use this formula:
    =TEXT(EOMONTH(B2,B2-1),"MMMM")
    PS: Assuming 1,2,...,12 are in range B2:B13

    Do not forget to confirm if it works for you.

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Excel 2007 : How to convert month number to month name

    Lmack, thanks for the suggestion

    You may not have noticed that I added an edit that I had "figured it out" Also, this thread is over 2 years old now - really interesting to see things that you could not do, just a few years ago - but now just take in your stride. So thanks for the trip down memory-lane

  13. #13
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: How to convert month number to month name

    Quote Originally Posted by FDibbins View Post
    I am trying to add a dynamic date rang to the heading of a table. I can find the earliest and latest dates, and want to concatenate them in the heading...
    I don't believe you can put a formula in a table heading?!?

    I would put the date in the row above.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    04-07-2014
    Location
    Port-au-Prince, Haiti
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel 2007 : How to convert month number to month name

    lolll, actually I was also stuck to it this morning and was looking for help at this forum. I saw your thread and the =TEXT(B2,"mmmm") solution which di not work but helped me to figure out including the EOMONTH function.

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Excel 2007 : How to convert month number to month name

    Xx7 - again, this thread is over 2 years old - and yes, you can put formulas in headings a normal "table", but not in a "created" Table

+ 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