Excel Formula: Convert Month Name to Number
Author: Sun Last Modified: 2022-01-19
This tutorial provides a formula to convert a month name to corresponding month number in Excel.
If you want to follow along with this tutorial, please download the example spreadsheet.
Generic formula
MONTH(DATEVALUE(month_name&1))
Syntaxt and arguments
Month_name: a cell refers to a month name that you want to convert it to month number. |
Return value
The formula returns an integer number (1-12).
How this formula works
To convert month names in list B3:B8, please use below formula:
=MONTH(DATEVALUE(B3&1))
Press Enter key, and drag auto fill handle down to the cells you use.
Explanation
DATEVALUE function: to convert the date stored as text into a valid date.
MONTH function: to convert a date to an integer number (1-12).
Relative Formulas
- Check If Date Is Last N Month From Today
Supposing you need to check if staff’s entry date is last 6 months from today, you can use a formula combined by AND, EOMONTH and TODAY functions in Excel to quickly handle the job. - Check If Date Is Last N Day Of Today
To check if the products are due today, you can use a formula to check if the production dates are last 7 days of today. - Combine Date And Text Into One Cell
Combine date and text together, formulas can help you in Excel - Get same day last year or next year
In this tutorial, it provides two formulas to separately get the same date last year and next year based on the given date in Excel.
Relative Functions
- Excel DATE Function
Create date with year, month and day - Excel YEAR Function
Returns the year of date in 4-digit serial number format - Excel MONTH Function
The MONTH is used to get the month as integer number (1 to 12) from date - Excel DAY Function
DAY function gets the day as a number (1 to 31) from a date - Excel WORKDAY Function
Add workdays to the given date and returns a workday
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...
Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.