Convert an abbreviated month name to an integer

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,600
Office Version
  1. 365
Platform
  1. Windows
I want to convert an abbreviated month name, e.g. Jan, Feb, Mar, etc into an integer that represents the month number, eg Jan = 1, Feb = 2, etc

Seems an easy thing to do the other way round, but am struggling with this.


Thanks
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hello,

2 ways I can think off :
New_Plat_Cust_Form.xls
ABCDE
1MonthCharMonthIntMonthCharMonthInt
2Feb2Jan1
3Mar3Feb2
4Mar3
5Apr4
6May5
7Jun6
8Jul7
9Aug8
10Sep9
11Oct10
12Nov11
13Dec12
New


Formula in B2:
=((A2="Jan")*1)+((A2="Feb")*2)+((A2="Mar")*3) will have to be expanded to ....((a2="Dec)*12)

formula in b3 uses vlookup easier to implement as if you type 1 and drag down to series, you don't have to type .
Same for Jan, drag down will increment the months.
 
Upvote 0

Forum statistics

Threads
1,214,996
Messages
6,122,636
Members
449,092
Latest member
bsb1122

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top