4 Ways to Convert Month Number to Name in Microsoft Excel

In this quick guide, I’ll show you how to convert month numbers to names in Excel for clarity in data visualization.

Processing month names as numbers in Excel, like using 1 for January, 2 for February, and so on, might make calculations easier. However, it’s far from professional or visually appealing when presenting data.

That’s where your skill to convert month numbers into full names comes into play. If you’re unsure how to do this or want to explore more efficient methods, this guide has you covered. Stick around, and we’ll walk you through the process step by step.

Using the Format Cells Tool

The Format Cells tool in Excel allows you to present numerical data in different ways by using custom number formatting codes.

Format Cells to show months as numbers
Format Cells to show months as numbers

For example, you can show the month numbers in the above dataset by selecting the cells in column B, pressing Ctrl + 1 to call the Format Cells dialog box, and entering a custom number formatting code in the Type field of the Custom category. This special code is m in the small case.

Virtual rendering of months as numbers
Virtual rendering of months as numbers

Now, you can only see numbers rather than months in the Incorporated Months column.

Convert month numbers to names
Convert month numbers to names

If you wish to show full month names instead of numerical values, select column B, or the column in your worksheet you’re testing this technique on.

Bring up the Format Cells dialog and apply the mmmm custom code in the Type field of the Custom category.

Click OK to apply the changes.

Month names visible
Month names visible

You’ve successfully converted months expressed in numerical values to months in text form.

However, the visual you see is only a virtual rendering and the content of column B is still in the Short Date or Long Date format, the originating date entries.

📒 Read More: 5 Ways To Convert Month to Number in Microsoft Excel

Using the TEXT Function

The most popular way to convert month numbers to their corresponding names is using different formulas of the TEXT function. It’ll work on three different data types. I’ve given samples for each data type so you can pick one that matches your requirements.

Short and Long Dates

Sample data 1

In the above dataset, the month entries are in the Short Date format.

Using TEXT formula for short dates
Using TEXT formula for short dates

Select the destination cell and type in the following formula into it:

=TEXT(B2,"mmmm")

Make sure you edit the cell range reference only, which is B2.

Calculate the TEXT function
Calculate the TEXT function

Now, hit Enter to calculate the cell.

Using fill handle for TEXT
Using fill handle for TEXT

Select this cell again and drag the fill handle down the column to copy and paste the formula into the rest of the cells.

Converted numbers to months
Converted numbers to months

Excel will automatically calculate these cells as you drag the fill handle down.

Numeric Month Number

Sample dataset 2

Sometimes, you could get month entries in the General number format as shown in the above sample dataset.

TEXT and DATE functions
TEXT and DATE functions

If you wish to transform such numeric values into their corresponding month names use a combination formula of TEXT and DATE. The DATE function tells Excel that the selected numeric value is a Short Date and the TEXT function converts the Short Date into a month name.

Organize your dataset as the sample data shown above. Then use this formula in the destination cell:

=TEXT(DATE(2024, A2, 1), "mmmm")
Drag down Fill handle
Drag down Fill handle

You can replicate the formula in the rest of the cells using the fill handle.

Converted month numbers to month names using TEXT and DATE
Converted month numbers to month names using TEXT and DATE

Finally, you’ve got the month names you’re looking for.

Text String Representing a Date

Month names from numbers using TEXT
Month names from numbers using TEXT

Suppose your input dataset of month entries is in text form. For example, as ‘1/1/2025, which is essentially a text and not a Short Date. In this scenario you can use this formula instead:

=TEXT(DATEVALUE(A2), "mmmm")

The rest of the steps are the same as explained earlier.

Using SWITCH Function

If you’re using Excel 2019 or a newer edition you can use the SWITCH function to create a simple formula to replace month numbers with month names. It’s compatible with the following input data types:

Numeric Month Numbers

Using SWITCH for numeric entries
Using SWITCH for numeric entries

If your source dataset contains simple 1s, 2s, 3s, etc., and you wish to translate these into month names, use this formula in all of the destination cells:

=SWITCH(A2, 1, "January", 2, "February", 3, "March", 4, "April", 5, "May", 6, "June", 7, "July", 8, "August", 9, "September", 10, "October", 11, "November", 12, "December", "Invalid")

Change the cell reference, A2, with an appropriate cell address from your worksheet.

Short Dates

SWITCH and MONTH functions
SWITCH and MONTH functions

If your input dataset of month entries is in the Excel Short Date format use the following combination formula involving the SWITCH and MONTH functions:

=SWITCH(MONTH(B2), 1, "January", 2, "February", 3, "March", 4, "April", 5, "May", 6, "June", 7, "July", 8, "August", 9, "September", 10, "October", 11, "November", 12, "December", "Invalid")

Text Strings Representing Month Numbers

Sample dataset 3

Does your worksheet containing month entries look exactly like the sample dataset shown above?

It means you’re using numerals in the text string format. When Excel cell contents align to the left the cell is in text string formatting mode.

SWITCH and VALUE functions
SWITCH and VALUE functions

For such a dataset, use the following SWITCH formula instead. In this formula, the VALUE function converts the numeric values into number formats and the SWITCH function converts numeric months to month names.

=SWITCH(VALUE(A2), 1, "January", 2, "February", 3, "March", 4, "April", 5, "May", 6, "June", 7, "July", 8, "August", 9, "September", 10, "October", 11, "November", 12, "December", "Invalid")

Using Power Query Editor

For a large dataset, it’s often recommended to use Power Query to transform the imported dataset before adding it to the active worksheet.

Importing external dataset
Importing external dataset

It comes with various external data connector options that you can choose from. You can find those in the Data tab > by clicking the Get Data command.

From Table Range command
From Table Range command

In this Excel tutorial, I’ll show the technique by exporting a dataset from the active worksheet.

So, select the source dataset you wish to load into the Power Query Editor.

Click on the From Table/Range command in the Data tab.

Hit the OK button on the Create Table dialog to finish.

Dataset in Power Query
Dataset in Power Query

You’ll see your Excel worksheet data in the Power Query Editor interface.

Let’s consider you’ve imported a dataset into Power Query containing month entries in the numeric month number format. This is the same as shown in the above screenshot.

Custom Column dialog box
Custom Column dialog box

Now, click on the Add Column tab and select the Custom Column command.

The Custom Column wizard will show up.

Type in a text in the New column name field which later becomes the column header for the custom column you’ll be creating shortly.

Now, enter the following Power Query M code into the Custom column formula field:

Date.MonthName(#date(2024, [Month], 1))

You must replace the code element [Month] with an appropriate column name according to your own Power Query Editor interface.

Click OK to create the new column.

Created the Month Name column
Created the Month Name column

You should already see that you’ve successfully converted month numbers to names in Power Query.

Close & Load To
Close & Load To

Click on the File menu and select Close & Load To from the context menu.

Import Data
Import Data

The Import Data dialog box will show up. Select the Existing worksheet option and highlight a cell on the active worksheet where you want the imported data. Click OK.

Imported data to active worksheet
Imported data to active worksheet

That’s it! You’ve imported the transformed data into an Excel worksheet. You can now remove the earlier data columns to eliminate redundancies.

Date.MonthName(#date(2024, [Month], 1))
Date.MonthName(#date(2024, [Month], 1))

If the source dataset is in the text string format, follow the same steps as mentioned so far to load your data in the Power Query Editor tool.

Power Query will automatically convert the text strings into numbers. You can now follow the rest of the steps to transform this data into month names.

Import dataset Short Dates
Import dataset Short Dates

However, if the source dataset is in the Short Dates format, the task becomes easier as you don’t need to apply any formula to create a new column with the necessary month names.

Import your input dataset into the Power Query Editor as shown in the screenshot.

Date command in Transform menu
Date command in Transform menu

Go to the Transform tab and click on the Date drop-down arrow in the Date & Time Column block.

Name of Month
Name of Month

Click on Month and then choose Name of Month within the Transform tab.

Converted month numbers to month names using Power Query
Converted month numbers to month names using Power Query

Congratulations! You’ve successfully converted Short Dates to month names.

Use the Close & Load To command to export the transformed data to an Excel worksheet by following the steps mentioned previously.

📚 Read more: You can also check out these Excel tutorials to learn related skills:

Conclusions

Now you know how to convert month numbers to names in Excel.

Which method did you like the most? Comment below to share your choice with me. If you know of a better technique that I might have missed, mention that in your reply.

About the Author

Tamal Das

Tamal Das

I'm a freelance writer at HowToExcel.org. After completing my MS in Science, I joined reputed IT consultancy companies to acquire hands-on knowledge of data analysis and data visualization techniques as a business analyst. Now, I'm a professional freelance content writer for everything Excel and its advanced support tools, like Power Pivot, Power Query, Office Scripts, and Excel VBA. I published many tutorials and how-to articles on Excel for sites like MakeUseOf, AddictiveTips, OnSheets, Technipages, and AppleToolBox. In weekends, I perform in-depth web search to learn the latest tricks and tips of Excel so I can write on these in the weekdays!

Related Posts

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃