+ Reply to Thread
Results 1 to 6 of 6

Count the number of occurrences between times (includes after midnight)

  1. #1
    Registered User
    Join Date
    05-15-2012
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Count the number of occurrences between times (includes after midnight)

    Hi,

    I have the data;

    9:00 PM
    12:00 AM
    12:00 AM
    4:00 PM
    5:00 PM
    1:00 PM
    12:00 AM
    10:00 PM

    and I'd like to count the number of occurrences that fall between 8pm and 1230am.

    So far =COUNTIFS(J5:J25,">=20:00",J5:J25,"<=24:30") is not giving me the correct result that is 5.

    Please help! Thank you 🙏

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,621

    Re: Count the number of occurrences between times (includes after midnight)

    Welcome to the forum

    As it is important to know if your data are real time or text looking like time ( format is not necessarily relevant),please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,621

    Re: Count the number of occurrences between times (includes after midnight)

    Still using XL 2003 ?

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Count the number of occurrences between times (includes after midnight)

    Try, =COUNTIFS(J5:J25,">=20:00")+COUNTIFS(J5:J25,"<=00:30")

  5. #5
    Registered User
    Join Date
    05-15-2012
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: Count the number of occurrences between times (includes after midnight)

    Quote Originally Posted by Pepe Le Mokko View Post
    Welcome to the forum

    As it is important to know if your data are real time or text looking like time ( format is not necessarily relevant),please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Ah thanks, sorry, I'll remember that next time.

  6. #6
    Registered User
    Join Date
    05-15-2012
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: Count the number of occurrences between times (includes after midnight)

    Quote Originally Posted by josephteh View Post
    Try, =COUNTIFS(J5:J25,">=20:00")+COUNTIFS(J5:J25,"<=00:30")
    This worked! Thank you.

+ 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] Calculate how many hours between two times are before midnight and after midnight
    By annazet in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-05-2019, 09:47 AM
  2. Need to count number of occurrences between a set of times
    By jbrakeman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-24-2018, 04:50 PM
  3. Replies: 10
    Last Post: 08-26-2016, 02:01 AM
  4. Count Occurrences of time stamp bewteen two times from DateTime Column
    By headric in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-18-2014, 09:08 AM
  5. Counting the number of occurrences and spanning midnight
    By allwrighty in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-01-2013, 05:53 PM
  6. Count the number of occurrences between In and Out times.
    By allwrighty in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2013, 05:18 PM
  7. [SOLVED] Count occurrences and sum values with times spanning over midnight.
    By SorZer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-14-2012, 04:12 AM

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