SOLVED

Problems sorting by Date

%3CLINGO-SUB%20id%3D%22lingo-sub-2491072%22%20slang%3D%22en-US%22%3EProblems%20sorting%20by%20Date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2491072%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20looked%20at%20many%20posts%20about%20users%20that%20are%20having%20issues%20sorting%20by%20date.%26nbsp%3B%20I%20checked%20and%20made%20sure%20they%20are%20in%20a%20date%20format%2C%20and%20I%20did%20the%20text%20to%20columns%20and%20it%20is%20still%20not%20sorting%20correctly%20by%20year%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CTABLE%20width%3D%22179%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22179%22%3E12%2F31%2F2025%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E12%2F31%2F2022%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E6%2F1%2F2022%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E5%2F1%2F2022%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E3%2F25%2F1937%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhy%20is%20the%20year%202025%20coming%20before%20the%20year%202022%3F%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EAlso%2C%20my%20Row%201%20is%20like%20a%20Title%20row%20and%20Row%202%20is%20a%20header%20row%2C%20it%20also%20wants%20to%20include%20Row%202%20in%20the%20sort.%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20help%20would%20be%20greatly%20appreciated!%26nbsp%3B%20Thank%20you%20in%20advance!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2491072%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20on%20mobile%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2491421%22%20slang%3D%22en-US%22%3ERe%3A%20Problems%20sorting%20by%20Date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2491421%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1089404%22%20target%3D%22_blank%22%3E%40Dansker%3C%2FA%3E%26nbsp%3BI'll%20take%20your%20word%20for%20it%20that%20the%20dates%20are%20in%20fact%20real%20dates.%20But%2C%20just%20to%20be%20sure%2C%20you%20can%20check%20that%20by%20referencing%20a%20cell%20with%20a%20date%20with%20ISNUMBER(cell).%20It%20should%20return%20TRUE.%20If%20it%20returns%20FALSE%20you%20are%20dealing%20with%20texts%20looking%20like%20dates%2C%20despite%20the%20text-to-columns%20procedure%20you%20performed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20dates%20in%20you%20list%20seem%20to%20be%20sorted%20in%20descending%20order%20(newest%20first).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20respect%20to%20Excel%20wanting%20to%20include%20the%20header%20row%20in%20the%20sort%2C%20note%20that%20you%20can%20have%20only%20one%20header%20row.%20You%20mention%20that%20the%20first%20row%20is%20a%20Title%20and%20the%20second%20is%20the%20Header.%20Insert%20an%20empty%20row%20between%20the%20Title%20and%20the%20Header%20and%20the%20sorting%20will%20correctly%20recognise%20the%20Header%20row%20and%20exclude%20it%20from%20the%20sort.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2497256%22%20slang%3D%22en-US%22%3ERe%3A%20Problems%20sorting%20by%20Date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2497256%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%2C%20thank%20you!%3CBR%20%2F%3E%3CBR%20%2F%3EActually%2C%20the%20issue%20was%20user%20error%20(me).%26nbsp%3B%20The%20one%20year%20should%20have%20been%26nbsp%3B%3CSTRONG%3E20%3C%2FSTRONG%3E37%2C%20not%26nbsp%3B%3CSTRONG%3E19%3C%2FSTRONG%3E37.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20added%20the%20blank%20row%20and%20fixed%20the%20date%20and%20it%20worked%20perfectly.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20again!%3C%2FP%3E%3C%2FLINGO-BODY%3E
New 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 (New 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!