Forum Discussion

daj4u_'s avatar
daj4u_
Copper Contributor
Mar 07, 2024
Solved

Excel Countif with date and time

3/5/2024 21:40 3/5/2024 21:40 3/5/2024 21:40 3/5/2024 21:40 3/5/2024 21:40 3/5/2024 21:41 3/5/2024 21:41 3/5/2024 22:41 This is my sample data in range A12:A19 I have a c...
  • OliverScheurich's avatar
    OliverScheurich
    Mar 07, 2024

    daj4u_ 

    =SUMPRODUCT((MOD(A2:A19,1)<22/24)*(MOD(A2:A19,1)>14/24))

     

    In this formula 22/24 is for 10 PM and 14/24 is for 2 PM. The range A2:A19 can be changed according to the actual size of the database. I can only guess that there is a text value in at least one cell in the range in column H. If your range is 1300 cell i'd reference e.g. H1:H1300 instead of H:H because the latter refers to 1048576 cells. It's easier to check if there is a text value in range H1:H1300.

Resources