ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   show month number as month name in Excel? (https://www.excelbanter.com/excel-discussion-misc-queries/31507-show-month-number-month-name-excel.html)

Phil Hart

show month number as month name in Excel?
 
I'm trying to format a field in an Excel Spreadsheet in such a way that it
displays a month name rather than a month number.

For Example, if a cell contains 8, I want the cell to show as August.

Conditional formatting only allows me 3 levels of condtions and isn't
therefore suitable.

Dave Peterson

I don't think you're gonna be able to use formatting for this.

But you could use a helper cell:

=date(2005,a1,1)
if A1 contained the month number.

Format this cell as MMMM
and you can keep the value as a real date.

or
=text(date(2005,a1,1),"MMMM")
If you want the text string for the month.


Phil Hart wrote:

I'm trying to format a field in an Excel Spreadsheet in such a way that it
displays a month name rather than a month number.

For Example, if a cell contains 8, I want the cell to show as August.

Conditional formatting only allows me 3 levels of condtions and isn't
therefore suitable.


--

Dave Peterson

swatsp0p


Because of the way Excel interprets dates, the number 8, by itself,
cannot be formatted as August. You can, however, use a helper column
to generate your desired output. Place this formula in your helper
column and FormatCustomMMMM

=(A1&"/01/2005")*1

If A1=8, "August" is returned
If A1=12, "December" is returned.

Adjust the cell reference as needed.

Good Luck.

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=380533


Ron Rosenfeld

On Mon, 20 Jun 2005 06:43:14 -0700, Phil Hart <Phil
wrote:

I'm trying to format a field in an Excel Spreadsheet in such a way that it
displays a month name rather than a month number.

For Example, if a cell contains 8, I want the cell to show as August.

Conditional formatting only allows me 3 levels of condtions and isn't
therefore suitable.


What is the contents of the field?

If the contents of the field is an Excel date, then use the Custom Format
"mmmm".

If the contents of the field is a number 1-12, one of the other solutions
already posted should work, as would:

=CHOOSE(A1,"January","February","March","April","M ay","June","July","August","September","October"," November","December")



--ron


All times are GMT +1. The time now is 03:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com