+ Reply to Thread
Results 1 to 5 of 5

Counting time ranges within a range

  1. #1
    Registered User
    Join Date
    09-05-2005
    Location
    Basingstoke, England
    MS-Off Ver
    2003
    Posts
    86

    Counting time ranges within a range

    I have a column of start times which are entered as per 24hr clock and what I am trying to do is to is to sort the times out into ranges;

    00:01 to 06:59, 07:00 to 19:00 and 19:01 to 00:00

    The range is T7:T488 and here is my first formula for 00:01 to 06:59 which works, it correctly finds 35 entries;

    Please Login or Register  to view this content.
    I have the time ranges set up for the two final formulas but I have massive negative values returned which is obviously not correct;

    Please Login or Register  to view this content.
    This returns a value of -289 whilst the other a value of -341.

    I may have gone about it the wrong way as I am trying to do things without too much assistance but this has me stumped. I would be most grateful to be shown the correct way, thank you.
    Last edited by Ducatisto; 10-16-2008 at 05:27 AM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Does this help? The time periods are

    00:01 06:59
    07:00 19:00
    19:01 23:59
    Attached Files Attached Files
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    09-05-2005
    Location
    Basingstoke, England
    MS-Off Ver
    2003
    Posts
    86
    Thank you for that. It came to the common conclusion even though it logically looked correct Excel hates midnight!

    Many thanks for your help.

    PS If this helps I have a macro that if indeed anyone has an already populated file and needs a similar solution this will add a second to all issues of midnight.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Shouldn't the replacement be 23:59:59, if you were counting 19:01 to midnight?

  5. #5
    Registered User
    Join Date
    09-05-2005
    Location
    Basingstoke, England
    MS-Off Ver
    2003
    Posts
    86
    Quote Originally Posted by oldchippy View Post
    Shouldn't the replacement be 23:59:59, if you were counting 19:01 to midnight?
    You are correct on that part, it was for current populated cells that referred to start times. From this moment on finish times that should be midnight will be entered as "23:59".

    Thank you for your help, I really could not have got a lot further without this forum and all of its contributors.

+ 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. Counting in between ranges
    By dreicer_Jarr in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 02-13-2014, 12:54 AM
  2. Countif between time ranges
    By dreicer_Jarr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-14-2008, 10:47 PM
  3. Comparing two named ranges and placing matches into third range
    By hydrojoe11 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2008, 10:14 AM
  4. Counting names, total time, and comparing sums
    By WillGabriel in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 11-27-2007, 04:19 PM
  5. Replies: 2
    Last Post: 11-12-2007, 06:43 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