I need to create a formula which turns a serial number MW-XXYYZZ where XX is the last to digits of the year, YY is the month and ZZ is the day in the month. i was able to drop the MW- with a simple substitute formula but that just leaves me with XXYYZZ which excel does not recognise as a date.
I need this to be a proper date in excel so just doing a substitute formula to get rid of the "MW-" is not enough, I then need excel to recognise it as a formula so it can work out the difference between that date and the current date. I thought maybe I could just get rid of the MW- and then tell it when it saw XX to change it to 20XX/ and then the second digit from YY to YY/ but i cant seem to work out how to say the 4th and 5th digit no matter what it is add a / to the end of it etc etc. and i cant manually do it as I run out of room in the formulaIs there a insert formula that maybe I could use?
im thinkin somthing along the lines of:
=insert(substitute(B3,"MW-",""),"?????/??/??")
Any ideas people???
-
Is there a reason you posted a MICROSOFT Excel question in the Linux forum?
Moving it to the proper forum... -
Assuming A1 has the value of 101225, the following formula will make a date of it:
=DATE(CONCATENATE("20",LEFT(A1,2)),MID(A1,3,2),RIGHT(A1,2))
And out will come: 12/25/2010
Confusing Excel problem...
Discussion in 'Windows OS and Software' started by aknight, May 25, 2010.