# How to Convert Month Name to Number in Google Sheets

Sometimes when working in Google Sheets, you may want to convert a month name to a number.

For example, maybe you have a cell that contains a month like “September” and you would like to use a formula to quickly convert this into the number 9 that represents the month.

This can be done pretty easily if you use the right formulas.

In this tutorial, I will show you how to convert a month name to a number in Google Sheets.

## Month Name to Number Using MONTH Function

One of the easiest ways to convert a month name to a number in your spreadsheet is to use the MONTH function.

The MONTH function will take a date and return the number representing the month of that date.

Here is an example: As you can see from the above example, all you need to do is put the date into the function and it will return the month number.

Now the only problem with this function is that it won’t return a number if you only have the text of the month in a cell.

Here is what I mean by this: You can see in the example above, it returns a #VALUE error because the month number needs either a date or a number to work, so the text representing the month won’t work with this function.

To get around this we need to make one simple change to our formula.

Here is the syntax we will use to convert the month name to the month number:

=MONTH(date&1)

By adding “&1” into the formula, this puts the month into a date which the MONTH function can then read to convert to the month number.

Here is an example: ## Convert Month Name to Number with IFS Function

Another option is to use the IFS function to convert the month name to a number.

Here is the formula that will do this:

=IFS(A2=“January”,1,A2=“February”,2,A2=“March”,3,A2=“April”,4,A2=“May”,5,A2=“June”,6,A2=“July”,7,A2=“August”,8,A2=“September”,9,A2=“October”,10,A2=“November”,11,A2=“December”,12) This method will check your cell to see if it is equal to the first month, if it is not it will continue to run through each month until it finds the match, and return the number associated with it.

## Closing Thoughts

I have now shown 2 methods for turning the month name into a number.

The first method is definitely easier, and I would recommend this first if you’re looking for a quick way to do this.

If you’re comfortable with the IFS function you may favor the second method, but this formula takes much longer to type out.