Convert Month Name to Number – Excel & Google Sheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on February 6, 2023
Download Example Workbook

Download the example workbook

This tutorial will demonstrate how to convert a month name to it’s corresponding number in Excel and Google Sheets.

Month Name to Main

Convert Month Name to Number

The first question to ask yourself when converting a month name to a number is: Is my month name stored as text?

If your month name is stored as text you can use the MONTH and DATEVALUE Functions to convert the month name, but if the month isn’t stored as text than you only need to adjust the formatting.

Month Name to Number – Formatting

If the cell containing the month name is right-aligned then the cell may contain a date (stored as a serial number) with cell number formatting set to month:

Month name

Simply change the date format from MMM (abbreviated name) or MMMM (full name) to M (month number, no leading zero) or MM (month number, with leading zero).

Month Format

You can change the date format from the Cell Formatting Menu:

custom number formats excel

Type “M” or “MM” in the Type area.

To access the Cell Formatting Menu use shortcut CTRL + 1 or press this button:

number format button

Month Name to Number – Functions

If your month name is stored as text then you can use this formula containing MONTH and DATEVALUE to calculate the month number:

=MONTH(DATEVALUE(B3&"1"))

Month Name to NumberConvert Month Name to Number in Google Sheets

All of the above examples work exactly the same in Google Sheets as in Excel.

Month Name to google sheet

AI Formula Generator

Try for Free

Excel Practice Worksheet

practice excel worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!

Free Download

Return to Excel Formulas List