Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Excel heavy user
 
Posts: n/a
Default Question on sorting dates

After I download data from a database, the data in the date column is in date
format, as for example, "11/02/2004". To make sure they are in date format, I
format them again. Then I tried to sort the date in an ascending order, it
doesn't work. It did some sorting work, but it put November dates right after
January dates, and then Feb, Mar.... I guess Excel doesn't really take this
column of data as dates.

Any help is appreciated.

Jason
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

What happens if you test with a formula

=ISTEXT(A2)

if it returns TRUE the dates are text, if so, copy an empty cell, select the
dates
and do editpaste special and select add, then reformat the dates as mm/dd/yyy
or dd/mm/yyyy depending on whether dates are US or UK format
If that does nolt help you probably have trailing or leading spaces as well,
then you can first do an editreplace and replace a space with nothing

Regards,

Peo Sjoblom

"Excel heavy user" wrote:

After I download data from a database, the data in the date column is in date
format, as for example, "11/02/2004". To make sure they are in date format, I
format them again. Then I tried to sort the date in an ascending order, it
doesn't work. It did some sorting work, but it put November dates right after
January dates, and then Feb, Mar.... I guess Excel doesn't really take this
column of data as dates.

Any help is appreciated.

Jason

  #3   Report Post  
Excel heavy user
 
Posts: n/a
Default

Thanks a lot.

Jason

"Peo Sjoblom" wrote:

What happens if you test with a formula

=ISTEXT(A2)

if it returns TRUE the dates are text, if so, copy an empty cell, select the
dates
and do editpaste special and select add, then reformat the dates as mm/dd/yyy
or dd/mm/yyyy depending on whether dates are US or UK format
If that does nolt help you probably have trailing or leading spaces as well,
then you can first do an editreplace and replace a space with nothing

Regards,

Peo Sjoblom

"Excel heavy user" wrote:

After I download data from a database, the data in the date column is in date
format, as for example, "11/02/2004". To make sure they are in date format, I
format them again. Then I tried to sort the date in an ascending order, it
doesn't work. It did some sorting work, but it put November dates right after
January dates, and then Feb, Mar.... I guess Excel doesn't really take this
column of data as dates.

Any help is appreciated.

Jason

  #4   Report Post  
Greg
 
Posts: n/a
Default


-----Original Message-----
After I download data from a database, the data in the

date column is in date
format, as for example, "11/02/2004". To make sure they

are in date format, I
format them again. Then I tried to sort the date in an

ascending order, it
doesn't work. It did some sorting work, but it put

November dates right after
January dates, and then Feb, Mar.... I guess Excel

doesn't really take this
column of data as dates.

Any help is appreciated.

Jason
.

When formatting your cells in Excel, try the GENERAL
format selection and see if that helps. Mine sorts
correctly when set that way and using your example. Greg
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting using dates Tpason Excel Discussion (Misc queries) 1 January 14th 05 09:21 PM
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 08:43 PM
I get wrong dates when i paste from a different sheet into a new s mmollat Excel Discussion (Misc queries) 2 January 6th 05 07:35 PM
Another question regarding Dates.. Anthony Slater Excel Discussion (Misc queries) 2 December 20th 04 03:31 PM
sorting question Brian Excel Discussion (Misc queries) 4 November 28th 04 12:30 PM


All times are GMT +1. The time now is 07:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"