View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
daddylonglegs daddylonglegs is offline
external usenet poster
 
Posts: 1
Default Looking to count using a greater-than


vldavis809 Wrote:
This one will not work properly. It gives me a number way off than the
true answer.
=SUMPRODUCT((HOUR(A1:A5)=18)+(HOUR(A1:A5)<6))


If you have blank cells in the range it will count these too. Try

=SUMPRODUCT((HOUR(A1:A5)=18)+(HOUR(A1:A5)<6),--(A1:A5<""))

vldavis809 Wrote:
The problem is, I need the count of hours between 0000 and 0100.


Not sure if you mean this or it's a typo. Just use

=COUNTIF(A1:A5,"<"&"01:00")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=570928