Sorting by date

Lopsie96

New Member
Joined
Apr 27, 2016
Messages
6
Hi,

I have exported a file as a CSV that includes dates and other information. Upon export, the dates are not in chronological order and I cannot seem to get them sorted into chronological order. I don't know what I am doing wrong. I also do believe that the dates are stored as text but can't seem to understand how to get them converted to date format even though I have highlighted the column and formatted as a date. Can someone help??
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
In a separate column, you can use the DATE function to convert the text value to a date format (you will need to parse it out from the text, let me know if you need help - include sample data from your workbook). You should then be able to sort on this new date column.
 
Last edited:
Upvote 0
Try selecting the column, click "Data" tab - click "Text To Columns" - select "Delimited" and click "Next", make sure "Other" is not checked and click "Next", select General and click "Finish"

There is a date option at the last stage if your date needs further adjustment rather than just the General option (only specifying General to start with as you sometimes have to use the reverse m/d to what you think depending on your region and you haven't stated what your date format is).
 
Last edited:
Upvote 0
I also do believe that the dates are stored as text but can't seem to understand how to get them converted to date format even though I have highlighted the column and formatted as a date.
Changing the format of a column of existing data will not convert the data, it just changes the format of the data (and date and other custom formats only apply to numeric data, not text data).

If the date column is already in a format which can be converted to a valid date, then you can simply select that column, go to the Data menu and select "Text to Columns", go to step 3 and choose the Date option with the proper date format, and click Finish. That will convert the Text entries to valid Dates.

If that does not work, please post a few sample of what these date entries look like.
 
Upvote 0
You are welcome.
Glad we were able to help!
:)
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,147
Members
453,021
Latest member
Justyna P

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