This is just an extension of the points made by 6SJ above...

Originally Posted by
MPICrusher
last three or four digits are the actual serial number
I suspect based on the data that prior to 2000 the codes were 3 digits and thereafter 4, correct ?
However, even if that is indeed the case you still can't distinguish between:
85104
085104
Given the latter's leading zero is the result of a custom format rather than a literal character (a point already made by 6SJ)
These two issues combined precludes you from establishing the year via the two leftmost characters of the underlying value
with the above values both would return 85 and we'd thus assume 3 digit code
So in short - as is - I don't think you can do what you want without use of some code - can you run XLM for ex. if you save as .xls ?
With B1 the active cell you could create the following name:
Name: =_TextValue
RefersTo: =GET.CELL(53,$A1)
Then
B1:
=YEAR("1-1-"&LEFT(_TextValue,2))&TEXT(REPLACE(_TextValue,1,2,"")+0,"0000")
copied down
but again this may not even be feasible for you and based on OP you may not even want to use an additional column
(using the above in 2007 format would necessitate .xlsm extension)
Bookmarks