Change my stock code to date?

kliff

New Member
Joined
May 15, 2011
Messages
4
I've set my stock codes using this format: year, month represented by a letter, stock descriptions.
For eg. 11B***** means year 2011, with 'B' designated for the month of February.
I already have the formula to calculate the number of months between 2 dates. I need to convert my stock codes to a date format.
How do I convert the first three numbers/letter to a date format so that I can use a formula to tell me how many months have past.

Thanks.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Thanks, Armando.
Could you help me tweat a bit more?
For eg, 10B05BX21
fisrt two digits mean 2010
the letter designates the month. ([FONT=Arial, sans-serif]A=Jan, B=Feb, C Mar, D Apr, E May, F Jun, G July, H Aug, J Sep, K Oct, L Nov, M Dec)
Is there any way I can have a formula to detect all these codes?
Or it's easier for me to add a new column with just the month?
[/FONT]
 
Upvote 0
Yes, yes, Armando. That's almost what I want.

The thing is I don't have an 'i' in the code.
The formula works fine for the months from Jan through Aug.
But from September onwards, I need to minus a value of one since the code for September is "J" instead of "i",
Oct is "K'" instead of "j",
Nov is "L"
Dec is "M".

thanks, Armando, for what you've done so far. Really appreciate it.
 
Upvote 0
Perfect, Armando!
You're brilliant.
I'd have used a complicated IF ELSE condition.
You've made my job easier.
Thanks a million.
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,544
Members
452,925
Latest member
duyvmex

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