Convert an abbreviated month name to an integer

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,490
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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

sunnyland

Well-known Member
Joined
Jan 27, 2006
Messages
912
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.
 

Forum statistics

Threads
1,141,924
Messages
5,709,375
Members
421,633
Latest member
Ubergribbler

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
Top