Lookup: Month Number From Month Name Text

Excel Formulas › Lookup

All versions

Imported reports often store the month as a word rather than a date. MATCH looks the first three letters up in an array constant of month abbreviations and returns the position, which is the month number. Because MATCH ignores case, March, MAR and mar all return 3.


Quick formula: Match the first three letters against the month list:
=MATCH(LEFT(B2,3),{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"},0)

The text March returns month 3, which falls in Q1.

Functions used (tap for the full reference guide):

The example

Three worked examples. Change any yellow input in the practice workbook and the results recalculate.

ABCD
1CaseMonthMonth #Quarter
2Row 1March3Q1
3Row 2sep9Q3
4Row 3December12Q4

The formula

Here is the formula, built directly from the inputs:

=MATCH(LEFT(B2,3),{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"},0) // Month #; Quarter

How it works

Here is the logic, one piece at a time:

  1. LEFT(B2,3) takes the abbreviation.
  2. The array constant lists the twelve months in order.
  3. MATCH(...,0) returns the position, which is the month number.
  4. ROUNDUP(C2/3,0) turns the month number into a quarter.

Keep every number in its own input cell so the formula never needs editing.

Try it: interactive demo

Interactive

Enter the values below.

Variations

Build a real date

First of the month in a given year.

=DATE(2026,C2,1)

Shortcut with DATEVALUE

Let Excel parse the name.

=MONTH(DATEVALUE(B2&" 1, 2026"))

Pitfalls & errors

Misspellings return #N/A; wrap in IFERROR to flag them.

Leading spaces shift LEFT's three letters; wrap the text in TRIM.

The same array trick works for weekday names with a seven-item list.

Practice workbook

Frequently asked questions

Is MATCH case-sensitive?
No, so mar and MAR both match Mar.
Why only three letters?
Every month is uniquely identified by its first three letters.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Build Clickable Links with HYPERLINK · Build References from Text with INDIRECT · Cascading (Two-Step) Lookups

Function references: MATCHLEFTROUNDUP