I love giving tips and advice on how to use various computer programs.
One of the most frustrating problems when working in Excel is when you encounter a spreadsheet which has messed up dates that won't seem to format properly. This often happens when converting text files to Excel or when using an Excel document with European date formatting which then can’t be converted to the US format (MM-DD-YY). This can be a big problem when you have large amounts of data in Excel that need to be sorted by date.
This article explains how to fix this date problem in Excel and to change the date format in Excel to one that works.
Step 1: The Problem, Excel Can't Recognise the Date Format
The following screenshot shows an Excel spreadsheet with dates that are not recognised by Excel. Excel does not recognise the full stop between each of the DD.MM.YY characters.
As shown in the below screenshot, it is no use trying to format this column because Excel does not recognise the column (A) as dates.
Step 2: Isolate the Year Field
What we have to do next is separate the problematic date fields into their component parts; that is year, month and day. The first step is to split the dates up, using the ‘Right’ and ‘Left’ function in Excel.
Let’s start by isolating the year characters. First we will make a new column called year. I then will use the right formula to isolate the last two characters in the date field.
The formula is as follows:
This formula will return the two characters on the rightmost side of the date field (i.e., 12). Then copy this formula all the way down the spreadsheet. We have now isolated the year.
Step 3: Isolate the Day Field
The next step is to isolate the day field. To do this, we follow a similar process to step two above. However, instead of using the right function, we will use the left function and return the two leftmost characters from the date field.
The formula is as follows:
Copy the formula all the way down the spreadsheet. We now have separately isolated the year and day.
Step 4: Isolate the Month Field
The next step is to isolate the month field. This is a little trickier because the characters we want to pull are in the middle of the date cell. In order to isolate the month characters, we need to use a two-step process.
Firstly, create a column called day and month and use the left function to isolate the five leftmost characters.
Then copy the formula all the way down the spreadsheet. We now have a five-character DD.MM field.
Step 5: Isolate the Month Field
Next we want to split up the DD.MM field into just month. To do this, we use the left function to isolate the two rightmost characters in the previously created column.
Then copy the formula all the way down the spreadsheet. We now have separated our MM field.
Step 6: Use the DATE Function to Put Together the Year, Month and Day Columns
The final step is to join our separate date elements together. To do this, I want to create a new column – let’s call it ‘Fixed date’.
The function we want to use to put the date back together in a usable format is the DATE function in Excel. The DATE function will separately take the year, month and day columns and join them together into a format that Excel will recognise.
The following screenshot shows how to use the DATE function.
As we can see, the DATE function has combined the individual year, month and day fields into a recognisable date. However, there is a problem. Excel is reading the 12 as the year 1912 instead of 2012. This is easily fixed. Use the DATE function again, but in the year field we want to add 100 years to column K to go from 1912 to 2012. See below screenshot for the formula to use.
Once we have fixed the formula then copy it down the rest of the spreadsheet. We now have a working date format.
Let’s now put the new fixed date into American format.
And copy the new date format down the remaining spreadsheet.
And that is it. We now have a column with dates that work, instead of an unreadable date format (column A). The last step is to tidy up the spreadsheet, remove the additional columns that we don’t need and replace the original broken date column A. To do this, I just cut and paste the new date column over the top of the old one, and there we have it, a spreadsheet with dates that now work and can be read by Excel.
This article is accurate and true to the best of the author’s knowledge. Content is for informational or entertainment purposes only and does not substitute for personal counsel or professional advice in business, financial, legal, or technical matters.
mrenn on January 10, 2013:
I am no expert, but I believe it is easier to use this method:
1. highlight the 'Date' column
2. click on 'Data' tab, then click on 'Text to Columns'
3. select 'Fixed width'
5.click 'Next' again
6. select 'Date', then see the drop down for the desired Date format
7. click 'Finish'....you should be done - if not right don't save and use the method posted above!
Theeyeballkid (author) on July 17, 2012:
Thanks very much! It is a little bit of a messy fix but it is the only one I have found that works.
monicamelendez from Salt Lake City on July 17, 2012:
Brilliant. Honestly I never would have come up with that technique in a million years - especially the technique for getting the middle column. Thanks!