Conditional Countif
If your data is arranged in this manner;
Column A Column B
Date&Time Status
12/31/2009 7:09 Startup
12/31/2009 7:39 Startup
12/31/2009 8:09
12/31/2009 8:39 Startup
12/31/2009 9:09
12/31/2009 9:39 Startup
12/31/2009 10:09 Startup
12/31/2009 10:39
12/31/2009 11:09 Startup
'between 8am and 8pm
With no blank cells and date/time in the range A2:A10
=SUMPRODUCT((HOUR(A2:A10-TIME(8,0,0))<12)*(B2:B10="Startup"))
'between 8pm and 8am
With no blank cells and date/time in the range A2:A10
=SUMPRODUCT(--(HOUR(A2:A10-TIME(8,0,0))=12)*(B2:B10="Startup"))
--
Jacob
"TFMR" wrote:
Hello all,
I have two column one with date & Time and other with status of vehicle, I
want to count how many startup during 08:00 to 20:00 and how many startup
20:00 to 08:00.
Thanks & Regards
|