PC Review


Reply
Thread Tools Rate Thread

Countif and Time fields

 
 
=?Utf-8?B?UkdGbGFkZQ==?=
Guest
Posts: n/a
 
      8th Feb 2007
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
 
Reply With Quote
 
 
 
 
T. Valko
Guest
Posts: n/a
 
      8th Feb 2007
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

"RGFlade" <(E-Mail Removed)> wrote in message
news:E64893F1-89BA-4CF6-9941-(E-Mail Removed)...
>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



 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      8th Feb 2007
>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

"T. Valko" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> "RGFlade" <(E-Mail Removed)> wrote in message
> news:E64893F1-89BA-4CF6-9941-(E-Mail Removed)...
>>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

>
>



 
Reply With Quote
 
=?Utf-8?B?UkdGbGFkZQ==?=
Guest
Posts: n/a
 
      21st Feb 2007
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


"T. Valko" wrote:

> >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
>
> "T. Valko" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> > "RGFlade" <(E-Mail Removed)> wrote in message
> > news:E64893F1-89BA-4CF6-9941-(E-Mail Removed)...
> >>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

> >
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Countif fields with ** Jerry Microsoft Excel Worksheet Functions 8 21st Jun 2008 03:55 AM
Using COUNTIF on multiple fields robotman@gmail.com Microsoft Excel Worksheet Functions 0 19th Sep 2006 08:31 PM
COUNTIF use with fields of time =?Utf-8?B?c3NoYWtsZXk=?= Microsoft Excel Worksheet Functions 5 1st Dec 2005 07:55 PM
COUNTIF on Summary Fields DLC Microsoft Excel Discussion 1 10th May 2005 02:20 AM
COUNTIF on Summary Fields DLC Microsoft Excel Discussion 1 9th May 2005 07:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:59 AM.