View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
az willie az willie is offline
external usenet poster
 
Posts: 5
Default Count cells in column that contain number in a range

?B?TWlrZSBI?= wrote in
:

=COUNTIF(I47:I3846,""&TIME(23,1,0))-COUNTIF(I47:I3846,"<"&TIME(24,0,0))


=================
That comes real close to working. I get a count but some of the numbers
are negative!!!

And, the numbers generated add up to way more than the actual count.

I had a column for events and one for the time and I summed the event
column and got 399 but some of the hour counts are almost that high.
I am < really puzzled at getting negative numbers for some hours.

The 10 pm to 11 pm and the 6 am to 7am and 7 am to 8 am generate negative
numbers.

I am still doing something wrong because I am getting too high a count.

I can't seem to get the formulas to paste correctly. I copied two colums.
One column has the formula and the next has the time span. When I paste
it, everything is getting mashed together. But I think you can see the
formulas ok. What have I done wrong here?

=COUNTIF(I4:I3846,""&TIME(22,1,0))-COUNTIF(I4:I3846,"<"&TIME(23,0,0))
10 PM TO 11 PM
=COUNTIF(I4:I3846,""&TIME(23,1,0))-COUNTIF(I4:I3846,"<"&TIME(24,0,0))
11PM TO 12 PM
=COUNTIF(I4:I3846,""&TIME(0,1,0))-COUNTIF(I4:I3846,"<"&TIME(1,0,0)) 12PM
TO 1 AM
=COUNTIF(I4:I3846,""&TIME(1,1,0))-COUNTIF(I4:I3846,"<"&TIME(2,0,0)) 1 AM
TO 2 AM
=COUNTIF(I4:I3846,""&TIME(2,1,0))-COUNTIF(I4:I3846,"<"&TIME(3,0,0)) 2 AM
TO 3 AM
=COUNTIF(I4:I3846,""&TIME(3,1,0))-COUNTIF(I4:I3846,"<"&TIME(4,0,0)) 3 AM
TO 4 AM
=COUNTIF(I4:I3846,""&TIME(4,1,0))-COUNTIF(I4:I3846,"<"&TIME(5,0,0)) 4 AM
TO 5 AM
=COUNTIF(I4:I3846,""&TIME(5,1,0))-COUNTIF(I4:I3846,"<"&TIME(6,0,0)) 5 AM
TO 6 AM
=COUNTIF(I4:I3846,""&TIME(6,1,0))-COUNTIF(I4:I3846,"<"&TIME(7,0,0)) 6 AM
TO 7 AM
=COUNTIF(I4:I3846,""&TIME(7,1,0))-COUNTIF(I4:I3846,"<"&TIME(8,0,0)) 7 AM
TO 8 AM








--
If you don't believe in Freedom of Speech for people you despise ... you
don't believe in it at all.