+ Reply to Thread
Results 1 to 19 of 19

counting times

Hybrid View

  1. #1
    Registered User
    Join Date
    02-10-2007
    Posts
    97

    counting times

    Guys just a quick one,
    in cell F5 I would like to know how to count the times between 13:00 am and 14:00 so if theres 3 times it will show a 3 i havnt got a clue what formula to use thanks anybody who can help
    Attached Files Attached Files
    Last edited by dodger999; 08-26-2009 at 07:39 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,535

    Re: counting times

    Based purely on your sample file, one method might be:

    D5: =SUMPRODUCT(--(HOUR($B$5:$B$11)=10+COLUMNS($D5:D5)))
    copied across as required

  3. #3
    Registered User
    Join Date
    02-10-2007
    Posts
    97

    Re: counting times

    Thanks for the quick reply but being the novice i am im a bit lost even though it does work i dont understand it sorry

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,535

    Re: counting times

    It counts the number of entries in B where the HOUR of said entry equates to the requisite value be it 11, 12 etc...

    The requisite hour (11, 12, 13 etc...) is determined by taking 10 and adding to that the number of columns in the specified range... in the first column that increment will be 1 (one column in range $D5:D5) therefore hour 11, when the formula is copied to E5 the increment will become 2 given there are two columns present in the range $D5:E5 and therefore making hour = 12 ... and so on and so forth.

    For more info. on SUMPRODUCT and coercion (--) refer to the link in my signature.

  5. #5
    Registered User
    Join Date
    02-10-2007
    Posts
    97

    Re: counting times

    Many thanks for the explanation

  6. #6
    Registered User
    Join Date
    02-10-2007
    Posts
    97

    Re: counting times

    Sorry 1 other problem thats just hit me is i should have put in AM times i:e cells should read 00:01 after midnight so 13:55 should really be 01:55 how do i get around this problem sorry to be a pain

+ 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