SOLVED

Problems sorting by Date

Copper Contributor

I have looked at many posts about users that are having issues sorting by date.  I checked and made sure they are in a date format, and I did the text to columns and it is still not sorting correctly by year:

12/31/2025
12/31/2022
6/1/2022
5/1/2022
3/25/1937

 

Why is the year 2025 coming before the year 2022?  

Also, my Row 1 is like a Title row and Row 2 is a header row, it also wants to include Row 2 in the sort.

Any help would be greatly appreciated!  Thank you in advance!

2 Replies
best response confirmed by Dansker (Copper Contributor)
Solution

@Dansker I'll take your word for it that the dates are in fact real dates. But, just to be sure, you can check that by referencing a cell with a date with ISNUMBER(cell). It should return TRUE. If it returns FALSE you are dealing with texts looking like dates, despite the text-to-columns procedure you performed.

 

The dates in your list seem to be sorted in descending order (newest first).

 

With respect to Excel wanting to include the header row in the sort, note that you can have only one header row. You mention that the first row is a Title and the second is the Header. Insert an empty row between the Title and the Header and the sorting will correctly recognise the Header row and exclude it from the sort.

@Riny_van_Eekelen , thank you!

Actually, the issue was user error (me).  The one year should have been 2037, not 1937.

 

I added the blank row and fixed the date and it worked perfectly.

 

Thank you again!

1 best response

Accepted Solutions
best response confirmed by Dansker (Copper Contributor)
Solution

@Dansker I'll take your word for it that the dates are in fact real dates. But, just to be sure, you can check that by referencing a cell with a date with ISNUMBER(cell). It should return TRUE. If it returns FALSE you are dealing with texts looking like dates, despite the text-to-columns procedure you performed.

 

The dates in your list seem to be sorted in descending order (newest first).

 

With respect to Excel wanting to include the header row in the sort, note that you can have only one header row. You mention that the first row is a Title and the second is the Header. Insert an empty row between the Title and the Header and the sorting will correctly recognise the Header row and exclude it from the sort.

View solution in original post