Convert '12-03 to 12-03 date

G

Guest

A co-worker created a spreadsheet with dates keyed in a column as text (e.g.,
'12-03 represents December 2003). I need to convert a very long column of
these "dates" to actual dates in the format MM-YY. Everything I try converts
it to the proper month, but year 05 (2005).

Your help is appreciated.
 
G

Guest

If your first entry is in A2, then
=DATE("20"&RIGHT(A2,2),LEFT(A2,FIND("-",A2)-1),1) will turn that into a date.
Autofill through the entire column.
HTH. --Bruce
 
D

Dave Peterson

You could use a formula like:
=DATE(2000+MID(A1,FIND("-",A1)+1,2),LEFT(A1,FIND("-",A1)-1),1)
(format the result as a nice date)

It'll give the 1st of the month.

Excel is seeing your 12-03 as December 3rd for the current year.
 
G

Guest

When you delete the apostrophe it interprets the date as m/dd and attaches
the current year.
I think you will need to use a dummy column with the formula
=DATE("20"&RIGHT(A1,2),MID(A1,2,2),1)
this will convert '12-03 to Dec 1, 2003. You will then need to change the
format to something like mm/yy. Then you will need to copy and paste
special, and select value to the original column. Finally delete the dummy
column.

Save your work first. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top