So I needed to extract the "062711" part of the following string:
B1 = "110623 Manufacturing Detail_CMO_MASTER_062711.xlsm"
So I used the following combination of text functions in a different cell:
"(MID(Sheet1!B1,LEN(Sheet1!B1)-10,6)"
and this gave me the "062711" that I was looking for.
I understand that while this looks like a number, but excel considers it a text. So I used the "value" function to convert this text to a number:
"VALUE((MID(Sheet1!B1,LEN(Sheet1!B1)-10,6))"
The problem that I am having is that when I format this number "062711" as a date, it is showing as September 10, 2071 instead of July 27, 2011. This is ofcourse not what I want.
Is there an elegant solution by which I can essentially tell excel to consider the first 2 digits as month, next 2 as date, and the following two as year? Since I have large amount of texts such as the one shown above, if there is a code etc. that I can pop into a macro, it would be very helpful.
I realize that is quite a common problem with Excel but am still having trouble with it. Please share your ideas on how to deal with this. Thanks!
B1 = "110623 Manufacturing Detail_CMO_MASTER_062711.xlsm"
So I used the following combination of text functions in a different cell:
"(MID(Sheet1!B1,LEN(Sheet1!B1)-10,6)"
and this gave me the "062711" that I was looking for.
I understand that while this looks like a number, but excel considers it a text. So I used the "value" function to convert this text to a number:
"VALUE((MID(Sheet1!B1,LEN(Sheet1!B1)-10,6))"
The problem that I am having is that when I format this number "062711" as a date, it is showing as September 10, 2071 instead of July 27, 2011. This is ofcourse not what I want.
Is there an elegant solution by which I can essentially tell excel to consider the first 2 digits as month, next 2 as date, and the following two as year? Since I have large amount of texts such as the one shown above, if there is a code etc. that I can pop into a macro, it would be very helpful.
I realize that is quite a common problem with Excel but am still having trouble with it. Please share your ideas on how to deal with this. Thanks!
Last edited: