View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Tevuna Tevuna is offline
external usenet poster
 
Posts: 136
Default Formula to count number of time stamps within a range in a column

Toppers' formula seems to work.
Sometimes it is better to create a new column. Toppers' absolute reference
wouldn't update when new data is added.
If the date/time is in column B, try entering this formula in cell A1. Drag
for entire column.

=IF(AND(MOD(B1,1)=TIME(5,45,0),MOD(B1,1)<TIME(17, 45,0)=TRUE,"Day","Night")

Then count "Day" and "Night"

=COUNTIF(A:A,"Day")
=COUNTIF(A:A,"Night")