Dates - issue with trying to sort

WendyHubard

New Member
Joined
Apr 4, 2017
Messages
29
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello Guru's. I have an excel spreadsheet that has been compiled by different external files. I'm having issues with trying to sort by date as the formats vary. They appear to be the same "dd/mmm/yyyy" BUT when I have checked the cells, some are dd/mm/yyyy and others are dd/mmm/yyyy. is there anyway to convert them so they are all are the same and i can then sort the data? Have attached, but it's probably confusing as in this thread it displays correctly, but not in my spreadsheet. You might need to copy and paste into a spreadsheet to see issue. Many thanks in advance.

01/Jan/2022
01/Jan/2022
01/Jan/2022
02/Jan/2022
02/Jan/2022
04/Jan/2022
04/Jan/2022
04/Jan/2022
04/Jan/2022
04/Jan/2022
05/Jan/2022
05/Jan/2022
05/Jan/2022
05/Jan/2022
05/Jan/2022
05/Jan/2022
05/Jan/2022
05/Jan/2022
05/Jan/2022
05/Jan/2022
30/Jan/2023
30/Mar/2023
30/Mar/2023
30/Mar/2023
31/Jan/2023
31/Jan/2023
31/Jan/2023
31/Jan/2023
31/Jan/2023
31/Mar/2023
31/Mar/2023
31/Mar/2023
31/Mar/2023
31/Mar/2023
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
You can use this Formula to convert some incorrect formats to your desired format

Excel Formula:
=TEXT(A1,"dd/mmm/yyyy")


1704264203810.png
 
Upvote 0
The sort should only be affected if some or all the dates are being recognised as Text by Excel. (Sunny's suggestion would make this worse)
If you want to do a one off conversion
• Highlight the column
• Data > Text to Columns > Delimited
• Delimiters will default to Tab - just click Next
• In the next screen select Date and Selecd D/M/Y
Either change the destination or leave it an copy over the top
• Finish

As a formula:
Excel Formula:
=VALUE(A1)
or
Excel Formula:
=--(A1)
Copy the formula to all rows and format the column in your desired date format,
 
Upvote 1
Solution
Thankyou both for the quick replies. Have gone with Alex's solution and it's worked a treat!!!!! Thank you so much
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

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