+ Reply to Thread
Results 1 to 4 of 4

Count numbers of times within hours

  1. #1
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Count numbers of times within hours

    What's the formula for counting the number of times something happened during a certain hour of the day?

    For example, if I want to take the collumn below and say there were two occurences from 2:00 to 2:59 and so on for each hour of the day (1:00 to 1:59, 3:00 to 3:59, etc.).

    21:29:00
    15:19:00
    14:30:00
    23:30:00
    14:56:00
    21:41:00

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    Here's one way, assuming your times are in A1:A100.....

    Put the time 00:00 in cell C1 and in C2 use the formula

    =C1+"1:00"

    copy down to C24

    Then in D1

    =SUMPRODUCT((A$1:A$100>=C1)*(A$1:A$100<C1+"1:00))

    format column C as hh:mm and column D as general......

  3. #3
    Registered User
    Join Date
    06-23-2015
    Location
    United States
    MS-Off Ver
    Office 2013
    Posts
    1

    Re: Count numbers of times within hours


  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Count numbers of times within hours

    gseixas welcome to the forum

    Do you have a question on this? If so, please start your our thread, and reference this thread, if you think it is valid
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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