Countif a datetime group is greater than a particular time, regardless of date

admvlad

New Member
Joined
Apr 29, 2024
Messages
2
Office Version
  1. 2021
Platform
  1. Windows
I am trying to track the start time of certain events. So I need to know if a time is after 4pm, however the format is a a date time group. How can I get a count of any start time after 4pm regardless of what the date is? The cell is formatted like this :
4/28/2024 10:52:00 AM
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
assume your date is in cell B2:

Formula in C2:
Excel Formula:
=Mod(B2,1)>16/24

will give yoiu true or false for any date with time greater than 4pm (not including 4 pm)
Cell Formulas
RangeFormula
C2:C17C2=MOD(B2,1)>16/24
D2D2=SUM(--(MOD($B$2:$B$17,1)>16/24))
B3:B17B3=B2+1+1/24
 
Last edited:
Upvote 0
Solution
assume your date is in cell B2:

Formula in C2:
Excel Formula:
=Mod(B2,1)>16/24

will give yoiu true or false for any date with time greater than 4pm (not including 4 pm)
Cell Formulas
RangeFormula
C2:C17C2=MOD(B2,1)>16/24
D2D2=SUM(--(MOD($B$2:$B$17,1)>16/24))
B3:B17B3=B2+1+1/24

Thank you awoohaw. That works perfectly!
 
Upvote 0

Forum statistics

Threads
1,215,944
Messages
6,127,835
Members
449,411
Latest member
adunn_23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top