Sort by date from Text format

mekcsx

New Member
Joined
Aug 22, 2013
Messages
10
I have a problem when I want to sort text to be a date format although I have already changed to date format. It still sort by text. For demonstrate, I have..

30/05/2013
31/04/2013
31/05/2013
30/06/2013

it gonna be..

30/05/2013
30/06/2013
31/04/2013
31/05/2013

As you can see above, It order from date like 30 to 31 first, then order month in the second priority. I don't know how to solve it. I have tried many ways. So, anyone has any idea to share about this problem. Thank you
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Assuming that your data starts in A1 then use a helper column with the formula
dragged down and sort on the helper column but obviously you need real dates (in my calendar there are only 30 days in April).
If need be then use a second helper column with
=MONTH(A1)
.
 
Last edited:
Upvote 0
Thanks MARK858,

I tried this in macro but it doesn't work.

Range("G6").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ReplaceFormat.NumberFormat = "dd/mm/yyyy;@"
Selection.Replace What:=".", Replacement:="/", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=NumberFormat = "dd/mm/yyyy;@"
 
Upvote 0
I am sorry but what relevance is a macro to try and change a number format when your question was how to do a sort? and also do a replace of a fullstop/period with a slash when your original data doesn't even have a fullstop/period???

mightily confused :confused::confused::confused::confused:

Perhaps you need to ask the question again/more clearly
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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