+ Reply to Thread
Results 1 to 8 of 8

Sort According to Time irrespective of the date.

Hybrid View

  1. #1
    Registered User
    Join Date
    04-23-2009
    Location
    Dallas,USA
    MS-Off Ver
    Excel 2003
    Posts
    17

    Sort According to Time irrespective of the date.

    I have this bunch of data. there are other values to the right of it. But I wanna sort by all the values at 11:00 a.m only. So is there a way to do this.

    For example; (please note the below each Date and time are in a single cell in excel)

    Date & Time
    4/21/2009 11:00
    4/21/2009 12:00
    4/21/2009 13:00
    4/21/2009 14:00
    4/21/2009 15:00
    4/21/2009 16:00
    4/21/2009 17:00
    4/21/2009 18:00
    4/21/2009 19:00
    4/21/2009 20:00
    4/21/2009 21:00
    4/21/2009 22:00
    4/21/2009 23:00
    4/22/2009 0:00
    4/22/2009 1:00
    4/22/2009 2:00
    4/22/2009 3:00
    4/22/2009 4:00
    4/22/2009 5:00
    4/22/2009 6:00
    4/22/2009 7:00
    4/22/2009 8:00
    4/22/2009 9:00
    4/22/2009 10:00
    4/22/2009 11:00
    4/22/2009 12:00
    4/22/2009 13:00
    4/22/2009 14:00
    4/22/2009 15:00
    4/22/2009 16:00
    4/22/2009 17:00
    4/22/2009 18:00
    4/22/2009 19:00
    4/22/2009 20:00
    4/22/2009 21:00
    4/22/2009 22:00
    4/22/2009 23:00
    4/23/2009 0:00
    4/23/2009 1:00
    4/23/2009 2:00
    4/23/2009 3:00
    4/23/2009 4:00
    4/23/2009 5:00
    4/23/2009 6:00
    4/23/2009 7:00
    4/23/2009 8:00
    4/23/2009 9:00
    4/23/2009 10:00
    4/23/2009 11:00
    4/23/2009 12:00
    4/23/2009 13:00
    4/23/2009 14:00
    4/23/2009 15:00
    4/23/2009 16:00
    4/23/2009 17:00
    4/23/2009 18:00
    4/23/2009 19:00
    4/23/2009 20:00
    4/23/2009 21:00
    4/23/2009 22:00
    4/23/2009 23:00
    4/24/2009 0:00
    4/24/2009 1:00
    4/24/2009 2:00
    4/24/2009 3:00
    4/24/2009 4:00
    4/24/2009 5:00
    4/24/2009 6:00
    4/24/2009 7:00
    4/24/2009 8:00
    4/24/2009 9:00
    4/24/2009 10:00
    4/24/2009 11:00
    4/24/2009 12:00
    4/24/2009 13:00
    4/24/2009 14:00
    4/24/2009 15:00
    4/24/2009 16:00
    4/24/2009 17:00
    4/24/2009 18:00
    4/24/2009 19:00
    4/24/2009 20:00
    4/24/2009 21:00
    4/24/2009 22:00
    4/24/2009 23:00
    4/25/2009 0:00
    4/25/2009 1:00
    4/25/2009 2:00
    4/25/2009 3:00
    4/25/2009 4:00

    I wish to have it look something lik
    4/21/2009 11:00
    4/22/2009 11:00
    4/23/2009 11:00
    4/24/2009 11:00
    4/25/2009 11:00
    other values follow here.

    Thanks a lot.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Sort According to Time irrespective of the date.

    Hi Addy,

    If that list were in column A1:A100, then in B1 put the formula

    =TIME(HOUR(A1),MINUTE(A1),SECOND(A1))

    Fill that down to B100 (or the last row of data in column A). Then select both columns and sort by column B (ascending) then column A (ascending). You can then delete column B if you'd like.

    Hope that helps!

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Sort According to Time irrespective of the date.

    Or =MOD(A1, 1)
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    04-23-2009
    Location
    Dallas,USA
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Sort According to Time irrespective of the date.

    Awesome Pjoaquin... but a small glitch..
    When i sort, it shows first 12:00 a.m, 1:00 a.m, 2:00 a.m etc cos day begins at 12:00 a.m rite. But is there a way to have it started from 11:00 a.m or 5:00 p.m or simply put in a custom time rather than have it starting at 12:00 a.m.

    Thanks a ton.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sort According to Time irrespective of the date.

    cant you just auto filter on time
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Registered User
    Join Date
    04-23-2009
    Location
    Dallas,USA
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Sort According to Time irrespective of the date.

    Hey thanks martin.. that worked as well. I have Office 07 on my laptop. I shall try with 03 and check back here cos thats wat i am suppose to use.

  7. #7
    Registered User
    Join Date
    04-23-2009
    Location
    Dallas,USA
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Sort According to Time irrespective of the date.

    Quote Originally Posted by martindwilson View Post
    cant you just auto filter on time
    I tried wat martin said. It worked like a charm in Office 07 but in Office 03 it gives me a error saying "Text you entered is not a valid reference of defined name" when I enter "Time" in the "Then by" drop down list.

    This is the sample Input Data.


    Date & Time
    4/21/2009 11:00
    4/21/2009 12:00
    4/21/2009 13:00
    4/21/2009 14:00
    4/21/2009 15:00
    4/21/2009 16:00
    4/21/2009 17:00
    4/21/2009 18:00
    4/21/2009 19:00
    4/21/2009 20:00
    4/21/2009 21:00
    4/21/2009 22:00
    4/21/2009 23:00
    4/22/2009 0:00
    4/22/2009 1:00
    4/22/2009 2:00
    4/22/2009 3:00
    4/22/2009 4:00
    4/22/2009 5:00
    4/22/2009 6:00
    4/22/2009 7:00
    4/22/2009 8:00
    4/22/2009 9:00
    4/22/2009 10:00
    4/22/2009 11:00
    4/22/2009 12:00
    4/22/2009 13:00
    4/22/2009 14:00
    4/22/2009 15:00

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sort According to Time irrespective of the date.

    select 11:00 from the drop down
    same in custom

+ 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