You may already know how to use the SORT function or how to use the menus to sort a list of dates. But, these sorts don’t always work correctly with dates. Dates are notoriously tricky to work with in a spreadsheet.
The only hint that Sheets gives you about the validity of your dates is the alignment of the data in the cell. If it recognizes a date, it will be shown as right-aligned. Even the November 6th, 2012 date above is invalid, but it is difficult to tell because the contents fill most of the cell, hiding the fact that it is left-aligned.
In order for a date to work like a number, Google Sheets has to recognize it as valid. If Sheets does not recognize your date, it won’t be able to sort it in relation to any other dates. When Sheets does recognize a value as a date, it converts it to a serial number so that it can use it in formulas.
Check Dates for Validity
So, how do you make sure all of your dates are valid? This can be done using the DATEVALUE function. The DATEVALUE function will check a date to make sure that it is recognized by Sheets as valid. If the date is valid, it will be returned as a serial number representation of that date. If the date is not valid, it will return a #VALUE! error. If you sort the results, all of the #VALUE!s will be together, then you can fix the dates that aren’t valid and try your sort again.
Sort Based on Date Values
If you sort your list now, all of the invalid dates will be grouped together. You can work on fixing each of them until the #VALUE! error goes away. First, highlight the range of data to be sorted. Be sure to select all of the columns but leave out the header row.
After highlighting the range that you want to sort, go to Data validation then Sort range. If you sort without selecting the range, Sheets will automatically sort by column A which is not where your date values are.
Select column B (or whatever columns your dates are in).
After sorting, all of your invalid dates will be grouped together. As you correct each one, the DATEVALUE formula will change from #VALUE! to the serial number representing that date. Fix them all and you’re ready to sort again!
Each date will sort as expected now that every date value has been checked and fixed with the help of the DATEVALUE function.