I have code that brings data in a database to Excel.
For it to be versatile the cells are formatted as "General". This worked.
Now someone wants to sort dates "Oldest to Newest" but the only option that shows up is A to Z or Z to A.
I followed all suggestions found in How to sort by dates excel?. Going through all those steps I did see the proper sort appear, so I recreated the workbook to reproduce this but could not.
Why doesn't formatting the column as a date display the "Oldest to Newest"?
What steps are required to get the sort options to display "Oldest to Newest"?
I press F2 and it does not work. I click on a cell in the original column that was general changed to date but it does not work. I click on the column header in the original column that was general changed to date but it does not work. I click on a cell in the new column that pasted values special but it does not work. I click on the column header in the new column that pasted values special but it does not work.
It's easy to sort an individual column into ascending or descending date order in Excel: Select the data you want to sort. From the menu bar (also called the ribbon) at the top of your screen, under the Home tab, select Sort & Filter. Then choose Sort Oldest to Newest or Sort Newest to Oldest.
dates in Excel are actually integer numbers starting from 01 Jan, 1990 as 1. For example 17 Mar 2021 is actually 44272. Applying formats like yyyy-mm-dd, yyyy-mm, or yyyy you only change visual representation of such numbers, it shall not affect sorting.
You need to convert all the values in the column to date in order to sort by date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With