COUNTIF: Count the no. of times less than...

crooser100

New Member
Joined
Dec 2, 2009
Messages
16
Hi there <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
I have a list of times that I want to collate. I need to count the no of occurrences:<o:p></o:p>
<o:p> </o:p>
Under 30 seconds<o:p></o:p>
Between 30 seconds to 1 minute<o:p></o:p>
Over 1 minute. <o:p></o:p>
<o:p></o:p>
However I’m unsure of the correct formula to use... I’ve tried using =COUNTIF(C13:C93,">0:00:30") but it keeps coming up with 0? Is this to do with the time? <o:p></o:p>
<o:p> </o:p>
Can anyone help? <o:p></o:p>

Regards
Jo
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,384
Try this...
=COUNTIF(C13:C93,">"&TIMEVALUE("00:00:30"))

Or
=COUNTIF(C13:C93,">"&TIME(0,0,30))
 

Weaver

Well-known Member
Joined
Sep 10, 2008
Messages
5,196
So you're trying to count times greater than 30 sec in your example?

I tried it with some times of my own and it seemed to work:

<TABLE style="WIDTH: 42pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=56 border=0 x:str><COLGROUP><COL style="WIDTH: 42pt" width=56><TBODY><TR style="HEIGHT: 11.25pt" height=15><TD class=xl22 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 42pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 11.25pt; BACKGROUND-COLOR: transparent" align=right width=56 height=15 x:num="1.1574074074074073E-5">00:00:01</TD></TR><TR style="HEIGHT: 11.25pt" height=15><TD class=xl22 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 11.25pt; BACKGROUND-COLOR: transparent" align=right height=15 x:num="2.8935185185185189E-4">00:00:25</TD></TR><TR style="HEIGHT: 11.25pt" height=15><TD class=xl22 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 11.25pt; BACKGROUND-COLOR: transparent" align=right height=15 x:num="6.8287037037037025E-4">00:00:59</TD></TR><TR style="HEIGHT: 11.25pt" height=15><TD class=xl22 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 11.25pt; BACKGROUND-COLOR: transparent" align=right height=15 x:num="3.1250000000000001E-4">00:00:27</TD></TR><TR style="HEIGHT: 11.25pt" height=15><TD class=xl22 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 11.25pt; BACKGROUND-COLOR: transparent" align=right height=15 x:num="3.8194444444444446E-4">00:00:33</TD></TR></TBODY></TABLE>

Gave a result of 2 using =COUNTIF(A1:A5,">0:00:30")

I'd check your time values aren't stored as strings instead of numbers. (Do this quickly by setting alignment to general - the numbers format to the right)
 

crooser100

New Member
Joined
Dec 2, 2009
Messages
16
Hmmm... Yes i've also just tried it again and it appears to work in a new sheet, but with the one i've set up, it still returns a 0 after changing the times to all sorts of different formats? Anything you can suggest?
 

Watch MrExcel Video

Forum statistics

Threads
1,123,295
Messages
5,600,785
Members
414,405
Latest member
Zaurb

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top