Computing.Net > Forums > Office Software > Convert number of month to name of month

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Convert number of month to name of month

Reply to Message Icon

Name: jvr3
Date: May 2, 2009 at 16:09:27 Pacific
OS: windows
Product: Hewlett-packard / 2003
Subcategory: Microsoft Office
Comment:

How do I convert the number of the month (1, 2, 3) to the month (Jan, Feb, Mar) in excel?



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: May 2, 2009 at 16:38:48 Pacific
Reply:

What do you mean "convert"?

Are you trying to retain the entire date but change the way it is displayed or are you trying to extract the month and put it in a cell by itself?


0

Response Number 2
Name: jvr3
Date: May 3, 2009 at 06:08:00 Pacific
Reply:

While changing the way the date is displayed is my ultimate goal, extracting the month number, i.e. 5 = May...11=Nov from another column that I hide within the spreadsheet will also solve my problem. I am learning more about Vlookup and this excel function looks like a promising approach.


0

Response Number 3
Name: Mike (by mmcconaghy)
Date: May 3, 2009 at 07:41:28 Pacific
Reply:

To redesign the way your date’s display you have all the choices offered
in the Date section of cell formatting or you can “roll your own” using a Custom Format.

But for now try this:

With your Date in A1 try this in cell B1:

=TEXT(A1,”MMMMM”)
for the first letter of the month

=TEXT(A1,”MMMM”)
for the month spelled out completely

=TEXT(A1,”MMM”)
for the 3 letter abbreviation of month

If you have a cell with just a number from 1 thru 12 you are going to
have to use some type of =IF function, or VBA code to match up the
number with the correct Month.

MIKE

http://www.skeptic.com/


0

Response Number 4
Name: DerbyDad03
Date: May 3, 2009 at 07:58:19 Pacific
Reply:

re: If you have a cell with just a number from 1 thru 12...

... you can use CHOOSE()

=CHOOSE(A1,"Jan","Feb","Mar","Apr","May", etc.)

You can also use CHOOSE with MONTH() if you have dates:

=CHOOSE(MONTH(D1),"Jan","Feb","Mar","Apr","May", etc.)


0

Response Number 5
Name: Mike (by mmcconaghy)
Date: May 3, 2009 at 10:06:07 Pacific
Reply:

Forgot about =CHOOSE
But it does make for a rather long formula, especially if you spell out the complete month name.
Not that I’m against long formulas, but I do prefer “short & sweet”.

MIKE

http://www.skeptic.com/


0

Related Posts

See More



Response Number 6
Name: jvr3
Date: May 3, 2009 at 12:44:23 Pacific
Reply:

Guys, Thanks a lot! The =Choose is the solution that I just tried and it works like a champ. One thing is for sure, there is more capability within excel than I will ever begin to tap into.


0

Response Number 7
Name: DerbyDad03
Date: May 3, 2009 at 15:24:39 Pacific
Reply:

If the CHOOSE option is too long for you, please show me how your IF suggestion would be “short & sweet”.


0

Response Number 8
Name: Mike (by mmcconaghy)
Date: May 3, 2009 at 15:43:54 Pacific
Reply:

The IF option was too long for my taste, that's why I opted for the TEXT solution, which you must admit, is a bit shorter than the CHOOSE solution.

MIKE

http://www.skeptic.com/


0

Response Number 9
Name: DerbyDad03
Date: May 3, 2009 at 15:59:18 Pacific
Reply:

Then why did you say "If you have a cell with just a number from 1 thru 12 you are going to have to use some type of =IF function..."


0

Response Number 10
Name: Mike (by mmcconaghy)
Date: May 3, 2009 at 17:22:05 Pacific
Reply:

In the first post, it was unclear if the contents of the cells in question had a date or simply a number.

If the Cells had only a number then the only option, that came to mind, was an =IF function, but that would have required two statements combined.
A daunting task for someone not accustomed to writing them.

I totally forgot about the =CHOOSE function.

When he replied with:

“While changing the way the date is displayed is my ultimate goal, extracting the month number, i.e. 5 = May...11=Nov from another column that I hide within the spreadsheet will also solve my problem.”

That then opened the field to include dates.

My first thought was to use the =MONTH function and a Custom Format of MMMM to get the month spelled out, but that does not work.

I then considered a =TEXT(MONTH(A1),”MMMM”) solution but opted for the shorter and simpler =TEXT(A1,”MMMM”)
that I suggested.

MIKE

http://www.skeptic.com/


0

Response Number 11
Name: DerbyDad03
Date: May 3, 2009 at 18:14:00 Pacific
Reply:

re: My first thought was to use the =MONTH function and a Custom Format of MMMM to get the month spelled out, but that does not work.

Works for me in 2003 Pro - all three formats mmm, mmmm & mmmmm

BTW...I was really offering CHOOSE just for the list of numbers, 1 - 12. The CHOOSE(MONTH(A1) was simply to show that many Excel functions can be combined.


0

Response Number 12
Name: Mike (by mmcconaghy)
Date: May 3, 2009 at 19:01:02 Pacific
Reply:

How did you get =MONTH to work?

In Column A, starting at A1 thru A13 I input he numbers 1 thru 13

In column B, I formatted cells B1 thru B13 as Custom Format, MMMM

I then entered the formula =MONTH(A1) in cell B1,
I then copied the formula down from B1 to B13 and all I got was January in every cell in column B.

The =MONTH function always required a Date to work.
Even then the custom format did not convert the number.

MIKE

http://www.skeptic.com/


0

Response Number 13
Name: Mike (by mmcconaghy)
Date: May 3, 2009 at 19:18:11 Pacific
Reply:

Sorry, last post it should read:

In Column A, starting at A1 thru A12 I input the Dates 1/1/07 thru 12/1/07.

In column B, I formatted cells B1 thru B12 as Custom Format, MMMM

MIKE

http://www.skeptic.com/


0

Response Number 14
Name: DerbyDad03
Date: May 3, 2009 at 21:20:32 Pacific
Reply:

You're right.

I must have tried a date in January, got January after the custom format, and assumed it worked for the other months.

I think what is happening is that as soon as you custom format the cell to be mmm Excel considers the cell to be a date_serial. Therefore, it sees 1 as 1/1/1900, 2 as 1/2/1900, etc. (Format those cells as dates and that's what you'll get.)

Since MONTH will always return 1 - 12, we'll always get January if we format with the m's.


0

Response Number 15
Name: Mike (by mmcconaghy)
Date: May 4, 2009 at 06:27:01 Pacific
Reply:

Makes sense.

MIKE

http://www.skeptic.com/


0

Response Number 16
Name: jon_k
Date: May 6, 2009 at 05:17:27 Pacific
Reply:

My $0.02: For a number from 1 to 12, I'd use

=TEXT(DATE(2000,A1,1),"mmm")


0

Response Number 17
Name: jvr3
Date: May 6, 2009 at 19:31:27 Pacific
Reply:

Well okay, the =TEXT(DATE(2000,A1,1),"mmm") works perfectly and is much shorter than the =choose approach.

I greatly appreciate all the discussions here.


0

Sponsored Link
Ads by Google
Reply to Message Icon

how do I start Office 200... Creating a Time card in E...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Convert number of month to name of month

Convert numbers to text www.computing.net/answers/office/convert-numbers-to-text/7247.html

Converting Lotus 123 files to Excel www.computing.net/answers/office/converting-lotus-123-files-to-excel/1009.html

Number of 'File paths' that can be www.computing.net/answers/office/number-of-file-paths-that-can-be-/4869.html