Solved Determine Number of Night Consultations from time entered

April 20, 2013 at 02:24:37
Specs: Windows 7
What formular can i use to determine the number of night consultations from time column of number of visits in one month.
Night consults is anytime between 18:00hrs to 06:00hrs, 06:00hrs to 18:00hrs are regular day consults

See More: Determine Number of Night Consultations from time entered

Report •


#1
April 20, 2013 at 06:46:48
✔ Best Answer
There may be a shorter method, but this seems to work:

=SUMPRODUCT((HOUR(A1:A25)>=16)*(HOUR(A1:A25)<=23))+
SUMPRODUCT((HOUR(A1:A25)>=0)*(HOUR(A1:A25)<=6))

The first SUMPRODUCT determines the number of Times whose Hour is >=16 and <=23.

The second SUMPRODUCT determines the number of Times whose Hour is >=0 and <=6.

Summing those 2 values should give you the result you are looking for.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •
Related Solutions


Ask Question