Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to sort dates from Oldest to Newest in Excel?

Tags:

sorting

excel

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.

like image 467
Joe Avatar asked Jun 21 '16 15:06

Joe


People also ask

How do I rearrange dates in Excel?

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.

Why are dates not sorting in Excel?

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.


1 Answers

You need to convert all the values in the column to date in order to sort by date.

like image 148
Jonny Avatar answered Sep 28 '22 23:09

Jonny