+ Reply to Thread
Results 1 to 5 of 5

Sorting the Date and Time

  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Sorting the Date and Time

    Hi,

    I have to sort the cells which have dates in the following format .
    Dec 31, 2012 3:33PM
    Dec 31 2012 12:07PM
    Dec 29 2012 12:25PM
    Dec 28 2012 4:25PM
    Dec 28 2012 12:21PM
    Dec 27 2012 4:26PM
    Dec 27 2012 11:48AM
    Dec 26 2011 3:46PM
    Dec 26 2009 12:01PM
    Dec 24 2011 3:59PM

    Can any one please tell me how sort the above kind of data ?

    Thanks,

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Sorting the Date and Time

    Just hi-light the data and:

    Data > Sort...

    you will see:

    Dec 26 2009 12:01 PM
    Dec 24 2011 03:59 PM
    Dec 26 2011 03:46 PM
    Dec 27 2012 11:48 AM
    Dec 27 2012 04:26 PM
    Dec 28 2012 12:21 PM
    Dec 28 2012 04:25 PM
    Dec 29 2012 12:25 PM
    Dec 31 2012 12:07 PM
    Dec 31 2012 03:33 PM
    Gary's Student

  3. #3
    Registered User
    Join Date
    01-03-2013
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sorting the Date and Time

    Thanks for the reply. But when I tried .. It is like this..
    Apr 1 2008 4:39PM
    Apr 1 2008 12:27PM
    Apr 1 2010 4:41PM
    Apr 1 2010 11:54AM
    Apr 1 2011 4:28PM
    Apr 1 2011 12:25PM
    Apr 2 2008 4:09PM
    Apr 2 2008 11:40AM
    Apr 2 2011 11:50AM
    Apr 2 2012 4:31PM
    Apr 2 2012 12:27PM
    Apr 3 2008 4:24PM
    Apr 3 2008 12:12PM
    Apr 3 2010 12:02PM
    Apr 3 2012 4:29PM
    Apr 3 2012 12:13PM

    After the year 2011 again 2008 values are picked up.

    When I check the cell value with ISTEXT() , it returned "TRUE". Is that causing the issue while sorting ? Can you please tell me how to convert the text format of date to date format ? Tried with Datevalue(). But returns no value.

    Thanks

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Sorting the Date and Time

    Strange...........I pasted your original posted data into a worksheet and got the attached.

    Does it sort for you??
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-03-2013
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sorting the Date and Time

    Hi,

    Problem here is the date is stored as text and not able to convert them to date format.
    so, divided the cell into date and time separately , then concatenated the results. Now it is solved.

    Thanks .

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1