+ Reply to Thread
Results 1 to 4 of 4

Need help sorting a field with date and time

  1. #1
    Registered User
    Join Date
    07-17-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    9

    Cool Need help sorting a field with date and time

    Hi, I am using Excel 2010 and I have a 6 spreadsheets with over 300 lines that I need to sort by time in a column that has date and time.

    In column B I have date and time, I need to sort that out by time only.

    Right now when I sort it, it sorts it by date and then by time, I would like it to ignore the date and just sort by time.

    More helpful would be a way to automatically enter the number 1 in column A if the time falls in the range of 06:00 and 17:59 and enter the number 2 for the time range of 18:00 to 05:59.

    Any help would be appreciated. I have attached a small sample.

    sample.xlsx

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,255

    Re: Need help sorting a field with date and time

    Is this what you want?
    Attached Files Attached Files
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Registered User
    Join Date
    07-17-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need help sorting a field with date and time

    Quote Originally Posted by popipipo View Post
    Is this what you want?
    Exactly what I wanted, thank you very much!

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Need help sorting a field with date and time

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Extracted time from date/time field does not flag on =IF(TIME function.
    By Vlad717 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-09-2013, 03:29 PM
  2. Date Sorting with key field as date and month only.
    By kvbalakumar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2009, 03:02 AM
  3. pivot table - sorting date field!!!
    By via135 in forum Excel General
    Replies: 1
    Last Post: 10-02-2006, 05:52 AM
  4. Replies: 4
    Last Post: 08-09-2005, 06:05 PM
  5. Remove time from a date and time field? Format removes the displa.
    By oaoboc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2005, 03:35 PM

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