Ever needed to convert the text Sep or September into a 9? Well Excel can convert text months into their respective numbers.

If you enter 1Sep in a cell Excel will convert that into the date 1/9/13. You can use that functionality to convert the text of a month into the month number.

Assume A1 contains the word September. The following formula will convert that into the number 9.

=MONTH(1&LEFT(A1,3))

Using the & symbol joins the 1 to the first three characters of the cell or 1Sep. Excel recognises that as a date format and treats it like a date for the MONTH function to then extract the month number.

Bracket in formula is in the wrong spot, worked a treat once corrected though 🙂

Thanks for spotting that – fixed.

when number should come its gettin converted into date. i need 2.86 , its showing feb-86.Please help!

It may be you wrote 20/7 which is either 20th July or 2.8571 or 2.86 in currency terms.

If you write 20/7/14 it should work

That’s unusual as the decimal point is not a date delimiter. I haven’t been able to replicate it, so I can’t offer a solution – sorry.

If you want to know more about “Converting Month Name To A Number In Excel”, check this link ……..

http://www.exceltip.com/tips/converting-month-name-to-a-number-in-excel-2010-2013.html

I want the month name to covert to a two digit Month Number, can this be done via a single formular, excel does not include the leading zero.

Month Name Month Number

January 01

February 02

March 03

April 04

May 05

June 06

July 07

August 08

September 09

October 10

November 11

December 12

Hi Sandeep

Assuming A1 has the month

=TEXT(MONTH(1&LEFT(A1,3)),”00″)

should work. It will return text.

Regards

Neale

Hi,

Assuming A1 has the month

=MONTH(A1&1)

It returns a number.

Also, it works for any month text (at least three characters) e.g. Jan, feb, March, …

Thanks – yes Excel is very flexible.

Your formula converts “Mar” into “J”…

Not sure why – unless you have another format on the cell – try removing all formats and see what it gives you.

I don’t understand, you all use &1 or 1&, but excel 2010 won’t take it.

Unless there is something I’m missing.

What exactly is the & role in this?

The & symbol joins text together – the formula creates a text string that Excel can treat as a date.

You can use & in all versions of Excel but you must use it in a formula with the = or + in front eg =1&”Jan” not 1&”Jan”

First – thanks for the post. Had to modify this slightly in PowerBI as it wouldn’t take 1Jan for some reason…it wanted 1-Jan. Simple adjustment to =Month(1&”-“&Left(Sheet[ColumnName],3)) made it work.

Good to see it can work with Power BI as well. Thanks for letting me know.

Thanks Neal… this is great. Is there a way to only convert the written month, but keep other parts of the date? For example, I have a client that sends me dates in excel written as “Nov 21, 2014” in a single cell. The system we use requires that the format read “11/21/2014”. Thanks!

Hi Dana

To convert that layout in A1 into a date you would use a formula like

=DATE(RIGHT(A1,4),MONTH(1&LEFT(A1,3)),MID(A1,5,SEARCH(“,”,A1)-5))

Hope that helps.

Regards

Neale

Is there a formula wherein I can change the month name to the month number, but there is a date that is with the month number.

Ex.

June (once I change June to July it would only affect the 06 but not the other parts of the date)

06/22/16

Hi Yana

If A1 contains June then this formula should work for year = 2016 and day = 22

=DATE(2016,MONTH(1&A1),22)

Hope that helps.

Regards

Neale

Thank you very much. 😀

Thank you very much. 😀

Thank you very much. 😀