Sort Date

C

carlos_ray86

I've read around and no one seems to answer just the straight
question on how to sort by date in a column.

I wrote a post before and was answered and confused me more than
before.

All I want to do is sort a series a dates in order. The dates are in
the form DD/MM/YYYY. This is all in one cell. So how would I sort this
in chronological order.

Thank you.
 
D

Daniel.C

Maybe, I am wrong, but dates are no peculiar problem.
Try :
Range("A1:A10").Sort key1:=Range("A1"), Header:=xlNo,
Order1:=xlAscending
 
C

carlos_ray86

That does work as a sort but the problem is that does it as if the
date was in the order MM/DD/YYY. which would work great. My problem is
my dates go in the order DD/MM/YYYY This would say that 20/4/2008
(April 20, 2008) is newer than 1/10/2008 (October, 1 2008). Do you get
what I mean? That is false April comes before October but not
according to the way it's set up now.
 
D

Daniel.C

My local settings are DD/MM/YYYY. Which ever is the date format, the
date is fundamentally a number, so sorting should always be correct.
The only point I see would be if a date is entered as M/D/Y in a D/M/Y
formatted cell. Can you post a sample of your data using
www.filedropper.com or else.
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top