Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2022, 01:04 AM
PomDave PomDave is offline Date Sorting Problem Windows 10 Date Sorting Problem Office 2010
Advanced Beginner
Date Sorting Problem
 
Join Date: Sep 2011
Location: Australia
Posts: 47
PomDave is on a distinguished road
Default

Yes, I thought I was pushing the bounds of possibilities, still it was worth a try as I know that there are some really smart bunnies out there.

Thanks anyway.
Reply With Quote
  #2  
Old 03-15-2022, 02:08 AM
ArviLaanemets ArviLaanemets is offline Date Sorting Problem Windows 8 Date Sorting Problem Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Quote:
Originally Posted by PomDave View Post
Yes, I thought I was pushing the bounds of possibilities, still it was worth a try as I know that there are some really smart bunnies out there.
A simplest solution - replace all non-date numeric entries (year numbers) manually with dates. E.g. instead 1965 enter a date like 01.01.1965, and instead 1985 enter 01.01.1985.
In case you want to display them as year numbers, simply format those cells as custom "yyyy" (but this is not obligatory). Now sorting by date returns exactly what you want.

In case those data are read dynamically form some database, the solution can be more tricky, involving a helper column where all non-date entries are replaced with calculated dates, and date entries with copy of dates, using some complex formula. Then you can sort by this helper column.
Reply With Quote
  #3  
Old 03-15-2022, 02:09 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Date Sorting Problem Windows 7 64bit Date Sorting Problem Office 2010
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,920
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

Quote:
Originally Posted by ArviLaanemets View Post
A simplest solution - replace all non-date numeric entries (year numbers) with dates. E.g. instead 1965 enter a date like 01.01.1965, and instead 1985 enter 01.01.1985.
In case you want to display them as year numbers, simply format those cells as custom "yyyy" (but this is not obligatory). Now sorting by date returns exactly what you want.

In case those data are read dynamically form some database, the solution can be more tricky, involving a helper column where all non-date entries are replaced with calculated dates, and date entries with copy of dates. Then you can sort by this helper column.

If you take a minute to open the file I posted that is EXACTLY what I did.
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #4  
Old 03-15-2022, 06:24 PM
PomDave PomDave is offline Date Sorting Problem Windows 10 Date Sorting Problem Office 2010
Advanced Beginner
Date Sorting Problem
 
Join Date: Sep 2011
Location: Australia
Posts: 47
PomDave is on a distinguished road
Default

Hi Pecoflyer,

I apologize most profusely, I did open the file but didn't take in exactly what was happening, sorry. OK that does sort things as I wanted.

Next question, when you set up a sort filter all columns are selected. Is there a way of disabling one columns sort filter without effecting the use of the others. As you can see, if you sort the Date column it doesn’t come out the same, because it’s looking at the date number.

Best Rgds,
Dave R.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Sorting Problem Formula For Sorting In Order Date Wise suniltko Excel 5 05-15-2018 09:18 PM
Sorting Problem RonLEngle Excel Programming 8 12-19-2017 01:15 PM
Sorting problem in Excel nrsmd Excel 2 10-08-2017 11:54 AM
Date Sorting Problem Problem sorting names alphabetically? mikehende Excel 12 09-12-2012 12:00 PM
sorting problem gsrikanth Excel 4 02-16-2012 12:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:39 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft