ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Counting Occurences According to Time (https://www.excelbanter.com/excel-programming/400291-counting-occurences-according-time.html)

SWFisherman

Counting Occurences According to Time
 
I am trying to write a function that will count up the number of times an
occurence happens according to how long something took.

Basically I have a column that subtracts how long a phone call took, it
subtracts time B from time A to get a certain number of hours and minutes and
that column is formatted to display 00:00 (hh:mm).

I need a function that counts how many calls took < 20min, 20-30min,
30-60min, 60-120min, & 120min. I have gotten the function to work just
looking at one cell, but when I give it the range of cells in that column I
get an error.

Bob Phillips

Counting Occurences According to Time
 
=COUNTIF(C1:C100,"<"&TIME(0,20,0))

=COUNTIF(C1:C100,"<"&TIME(0,30,0))-COUNTIF(C1:C100,"<"&TIME(0,20,0))

etc.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"SWFisherman" wrote in message
...
I am trying to write a function that will count up the number of times an
occurence happens according to how long something took.

Basically I have a column that subtracts how long a phone call took, it
subtracts time B from time A to get a certain number of hours and minutes
and
that column is formatted to display 00:00 (hh:mm).

I need a function that counts how many calls took < 20min, 20-30min,
30-60min, 60-120min, & 120min. I have gotten the function to work just
looking at one cell, but when I give it the range of cells in that column
I
get an error.




SWFisherman

Counting Occurences According to Time
 
Thanks a lot, it works Perfect, your the man.



"Bob Phillips" wrote:

=COUNTIF(C1:C100,"<"&TIME(0,20,0))

=COUNTIF(C1:C100,"<"&TIME(0,30,0))-COUNTIF(C1:C100,"<"&TIME(0,20,0))

etc.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"SWFisherman" wrote in message
...
I am trying to write a function that will count up the number of times an
occurence happens according to how long something took.

Basically I have a column that subtracts how long a phone call took, it
subtracts time B from time A to get a certain number of hours and minutes
and
that column is formatted to display 00:00 (hh:mm).

I need a function that counts how many calls took < 20min, 20-30min,
30-60min, 60-120min, & 120min. I have gotten the function to work just
looking at one cell, but when I give it the range of cells in that column
I
get an error.






All times are GMT +1. The time now is 08:06 AM.

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