+ Reply to Thread
Results 1 to 6 of 6

Creating Histograms with Time Ranges

  1. #1
    Registered User
    Join Date
    01-07-2010
    Location
    Chandler, AZ
    MS-Off Ver
    Excel 2013
    Posts
    9

    Creating Histograms with Time Ranges

    I have 16,790 records with military time stamps (00:00 - 23:59) that I need to sort into the following ranges:

    04:00 - 10:59
    11:00 - 13:59
    14:00 - 16:59
    17:00 - 03:59

    Any insight would be appreciated.

    - Joe

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Creating Histograms with Time Ranges

    Hi Joe,

    Here's my take... note that I'm using Excel 2010, so the attachment might not show up...

    1. I used a helper column with this formula...
    =IF(A2>=TIME(17,0,0),"17:00 - 03:59",IF(A2>=TIME(14,0,0),"14:00 - 16:59",IF(A2>=TIME(11,0,0),"11:00 - 13:59",IF(A2>=TIME(4,0,0),"04:00 - 10:59","17:00 - 03:59"))))

    2. Then used a COUNTIF function...

    3. Then inserted a bar chart (highlighted E3:F7, then insert chart)

    Hope this helps... let me know if you get stuck...

    Dennis
    Attached Files Attached Files

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Creating Histograms with Time Ranges

    Good job Dennis.

    Without the helper columns, you could determine count by using the following
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    See attached
    Attached Files Attached Files
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Creating Histograms with Time Ranges

    Thanks, Ace... great formula on your end too... nice, clean and elegant...

  5. #5
    Registered User
    Join Date
    01-07-2010
    Location
    Chandler, AZ
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Creating Histograms with Time Ranges

    Quote Originally Posted by djapigo View Post
    Hi Joe,

    Here's my take... note that I'm using Excel 2010, so the attachment might not show up...

    1. I used a helper column with this formula...
    =IF(A2>=TIME(17,0,0),"17:00 - 03:59",IF(A2>=TIME(14,0,0),"14:00 - 16:59",IF(A2>=TIME(11,0,0),"11:00 - 13:59",IF(A2>=TIME(4,0,0),"04:00 - 10:59","17:00 - 03:59"))))

    2. Then used a COUNTIF function...

    3. Then inserted a bar chart (highlighted E3:F7, then insert chart)

    Hope this helps... let me know if you get stuck...

    Dennis


    Dennis -

    Thnaks so much for your help. Have a wonderful weekend.

    - Joe

  6. #6
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Creating Histograms with Time Ranges

    No problem, Joe... we're here to help... did you see Ace's formula... it works without the helper column...

    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

+ 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