ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   counting cells between two times (https://www.excelbanter.com/excel-discussion-misc-queries/251361-counting-cells-between-two-times.html)

suzie

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?


Jacob Skaria

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?


Ms-Exl-Learner

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?


T. Valko

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?




suzie

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?



.


T. Valko

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?



.





All times are GMT +1. The time now is 02:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com