Custom Sort Column by Time AM PM not working or Bug?

kellman

New Member
Joined
Aug 25, 2012
Messages
32
Office Version
  1. 365
Platform
  1. Windows
I'm trying to sort the Column by it's date & time AM/PM in order of earlier to oldest.

This was sorting correctly earlier, but now refuses to sort correctly.

Microsoft® Excel® for Microsoft 365 MSO (Version 2211 Build 16.0.15831.20098) 64-bit

It should list the time sorted as this:

8:00 AM
12:00 PM
4:00 PM

Instead I get the following weird order.

Dates with AM PM.xlsm
A
1Actual Appt Start
212/9/2022 12:00 PM
312/9/2022 4:00 PM
412/9/2022 8:00 AM
Sheet1


Note: I've tried with Cells formatted as Text and also by Date, no change
Tried Sort A-Z and Z-A and no change.
Rebooted computer with no change.
 

Attachments

  • Sort by AM PM Example.PNG
    Sort by AM PM Example.PNG
    32.7 KB · Views: 17
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I am completely baffled. Again everything was working earlier today, no software or update changes made.
I was able to sort the Date column without any special formatting previously.
I even installed an older copy of Office 2007 and have the same issue.

I have uploaded a copy here, if you don't mind taking a look:
Date Sorting Example for Mr Excel.xlsx
 
Upvote 0
Okay I think that I'm onto something here.
Running Windows 10 current version / build.

I changed Windows 10 Region Date & Time Data Format to match the short date format Date I'm using in my excel project to DD-MM-YY and now I can sort the date column normally!

This time I received the "Sort Warning" dialogue box mentioned earlier, and after clicking the "OK" button, all worked properly as it had earlier this morning.

Struggling to wrap my head around how changing Windows 10 Date Time Data settings made this work, as I never changed anything in the first place.

I hope this helps someone else that might experience this bug.
 

Attachments

  • Change Data Format Win10.PNG
    Change Data Format Win10.PNG
    74.3 KB · Views: 16
  • Sort after changing Win10 Region short date format.PNG
    Sort after changing Win10 Region short date format.PNG
    69.6 KB · Views: 15
Upvote 0
Solution
Glad you got it sorted. Thanks for letting us know.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,582
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top