Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default counting cells between two times

I have a spreadsheet with occurences of incidents where the time of the
incident is recorded. I'm trying to count the number of times the incident
occurs between certain times (eg 7am and 11am) by using the countif function
with variations on the following formula =countif(B:B, "=07:00:00 &
<11:00:00") but it is not calculating it correctly. Can somebody help?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default counting cells between two times

Try

=COUNTIF(A:A,"=07:00:00")-COUNTIF(A:A,"11:00:00")

--
Jacob


"Suzie" wrote:

I have a spreadsheet with occurences of incidents where the time of the
incident is recorded. I'm trying to count the number of times the incident
occurs between certain times (eg 7am and 11am) by using the countif function
with variations on the following formula =countif(B:B, "=07:00:00 &
<11:00:00") but it is not calculating it correctly. Can somebody help?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 506
Default counting cells between two times


=SUMPRODUCT(($A$1:$A$100TIME(7,0,0))*($A$1:$A$100 <TIME(11,0,0)))
Change the cell reference A1:A100 to your desired range.

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Suzie" wrote:

I have a spreadsheet with occurences of incidents where the time of the
incident is recorded. I'm trying to count the number of times the incident
occurs between certain times (eg 7am and 11am) by using the countif function
with variations on the following formula =countif(B:B, "=07:00:00 &
<11:00:00") but it is not calculating it correctly. Can somebody help?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default counting cells between two times

Use cells to hold the time boundaries:

A1 = start time = 7:00 AM
A2 = end time = 11:00 AM

=COUNTIF(B:B,"="&A1)-COUNTIF(B:B,""&A2)

--
Biff
Microsoft Excel MVP


"Suzie" wrote in message
...
I have a spreadsheet with occurences of incidents where the time of the
incident is recorded. I'm trying to count the number of times the incident
occurs between certain times (eg 7am and 11am) by using the countif
function
with variations on the following formula =countif(B:B, "=07:00:00 &
<11:00:00") but it is not calculating it correctly. Can somebody help?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default counting cells between two times

Thank you, all of these solutions worked!
Cheers,
Suzie

"T. Valko" wrote:

Use cells to hold the time boundaries:

A1 = start time = 7:00 AM
A2 = end time = 11:00 AM

=COUNTIF(B:B,"="&A1)-COUNTIF(B:B,""&A2)

--
Biff
Microsoft Excel MVP


"Suzie" wrote in message
...
I have a spreadsheet with occurences of incidents where the time of the
incident is recorded. I'm trying to count the number of times the incident
occurs between certain times (eg 7am and 11am) by using the countif
function
with variations on the following formula =countif(B:B, "=07:00:00 &
<11:00:00") but it is not calculating it correctly. Can somebody help?



.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default counting cells between two times

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Suzie" wrote in message
...
Thank you, all of these solutions worked!
Cheers,
Suzie

"T. Valko" wrote:

Use cells to hold the time boundaries:

A1 = start time = 7:00 AM
A2 = end time = 11:00 AM

=COUNTIF(B:B,"="&A1)-COUNTIF(B:B,""&A2)

--
Biff
Microsoft Excel MVP


"Suzie" wrote in message
...
I have a spreadsheet with occurences of incidents where the time of the
incident is recorded. I'm trying to count the number of times the
incident
occurs between certain times (eg 7am and 11am) by using the countif
function
with variations on the following formula =countif(B:B, "=07:00:00 &
<11:00:00") but it is not calculating it correctly. Can somebody help?



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting event times wally New Users to Excel 5 December 18th 09 04:12 AM
counting how many times something happens in a week lukesdad Excel Discussion (Misc queries) 2 May 22nd 09 04:17 PM
Counting number of times a value occurs da Excel Discussion (Misc queries) 6 September 9th 08 03:51 PM
Counting the times a number appears Jennifer B[_2_] Excel Discussion (Misc queries) 2 July 17th 08 11:54 PM
Counting cells with a specified frequency(how many times it appear Kelvin Excel Discussion (Misc queries) 0 July 13th 05 08:36 AM


All times are GMT +1. The time now is 09:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"