Countif and Time fields

R

RGFlade

I have a list of times. The column is formated for "Time 13:00" format and
it is calculated from two other fields. The calculation to create this time
is correct and the format is correct.

I want to be able to count the # of times that a time is listed between two
values (e.g., # >=00:00 and <=00:30, # >00:30 and <=01:00, # >01:00 and
<=01:30, etc.). I have used the countif statement the way I have seen it
listed here but it doesn't count the times correctly (I think the formula was
=countif(I1:I7201,">=time(00,00,00) AND <=time(00,30,00)"). It just does not
give the correct answer.

Does anyone have an idea?
Thanks
Bob
 
T

T. Valko

Try it like this:

=COUNTIF(A1:A20,">="&TIME(0,0,0))-COUNTIF(A1:A20,">"&TIME(0,30,0))

For the last interval (if you need to go that high):

11:30 PM to 12:00 AM
23:30 to 24:00
You have to cut it off at 11:59 PM (23:59)

Biff
 
T

T. Valko

For the last interval (if you need to go that high):
11:30 PM to 12:00 AM
23:30 to 24:00
You have to cut it off at 11:59 PM (23:59)

Check that.

If you're using 0:00 to represent 12:00 AM then you just don't want the last
interval to be:

23:30 to 0:00

You can use 24:00

Biff
 
R

RGFlade

Thanks for your help with this. . . sorry for being late at replying. . .
have a GREAT day.
--
Robert G. Flade, RN, MS
Director - Emergency Department
The Hospital of Central Connecticut
at New Britain General Hospital
New Britain, CT 06050-0100
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top