This issue has perplexed me off and on for the past two years! I am documenting the solution here in this Blog more for myself than anyone else. I must have spent a whole hour researching this issue, VLOOKUP, DBA, all kinds of solutions but not quite the one I was looking for.
Issue: Sorting on dates not working correctly because the sort key would be based on the month digit as text instead of a number. i.e. 1/1/2010 would be followed by 1/2/2008
Solution: Tell the sort to treat the dates as numbers instead of text.
Implementation:
We assume that the data has column headers and at least one column with dates.
Note: There are several ways to accomplish this, so whatever works for you, but this is how I do it.
Make sure that data filtering is active.
Eia la! Our data is sorted and ready for manipulation.
Happy Times!
Issue: Sorting on dates not working correctly because the sort key would be based on the month digit as text instead of a number. i.e. 1/1/2010 would be followed by 1/2/2008
Solution: Tell the sort to treat the dates as numbers instead of text.
Implementation:
We assume that the data has column headers and at least one column with dates.
Note: There are several ways to accomplish this, so whatever works for you, but this is how I do it.
Make sure that data filtering is active.
- Home tab > Editing Box > Sort & Filter > Filter
- Home tab > Editing Box > Sort & Filter > Custom Sort
- Sort by "Dates Column"; Sort on "Values"; Order "A to Z"
- Sort Warning Dialog Box pops up.
- Asks what you would like to do because your column header has text, but the column also has "date" values.
Eia la! Our data is sorted and ready for manipulation.
Happy Times!