Convert three letter month abbreviation to number?

4

1

Is there an excel function for converting a three letter month abbreviation (such as FEB, APR) to a number? I've been using a mapping table and then using v-lookup from there, but curious if there's a function or faster way.

Thanks!

edit to clarify: this is one column that has the three letter month abbreviation hardcoded in (i.e. it is not part of a longer date)

octothorpe_not_hashtag

Posted 2017-05-08T19:48:11.380

Reputation: 43

Answers

4

You can use MONTH() and create a pseudo date for it:

=MONTH(DATEVALUE(A1&" 1, 2017"))

enter image description here


Or another variation on the same theme:

=--TEXT(DATEVALUE(A1 & "1, 2017"),"m")

One more note: DATEVALUE can be replaced by -- in both formula.

=MONTH(--(A1&" 1, 2017"))

and

=--TEXT(--(A1 & "1, 2017"),"m")

Scott Craner

Posted 2017-05-08T19:48:11.380

Reputation: 16 128

0

Excel natively supports this using cell formatting. If you write a date, you can format the cell to show the month by 3 letters, but the value will actually be the month's number.

LPChip

Posted 2017-05-08T19:48:11.380

Reputation: 42 190

To clarify, my case is where the three letter abbreviation is the hardcoded into a column as the only value – octothorpe_not_hashtag – 2017-05-08T20:02:49.180

-1

This is how to convert 01JAN1900 to 1/1/1900

  • split the original date into 3 separate columns using the functions Left middle right.

    This should look this:

    enter image description here

  • Next link the 3 cells using =G2&"-"&H2&"-"&I2. This will put the dates in an excel format.

  • Next copy the column and paste values.

  • You can now right click on cell and format the date to desired format.

Darin

Posted 2017-05-08T19:48:11.380

Reputation: 1

The question is about a cell containing a three-letter text value (such as “FEB” or “APR”). If you want to answer a totally different question, then *ask* it as a new question and post your answer there. The above is not an answer to this question.   P.S. A correct answer to this question has already been posted.

– Scott – 2018-09-25T15:40:11.653