View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default countif function

Try this:

Assuming the cells contain time values only or are empty (no text).

=SUMPRODUCT(--(B2:B20=TIME(8,0,0)),--(C2:C20<""),--(C2:C20<=TIME(8,59,0)))

Better to use cells to hold the time boundaries:

A1 = 8:00 AM
A2 = 8:59 AM

=SUMPRODUCT(--(B2:B20=A1),--(C2:C20<""),--(C2:C20<=A2))


--
Biff
Microsoft Excel MVP


"jerry" wrote in message
...
I have a 4 column spreadsheet. Col a = date, Col b = time in, Col c = time
out, Col d = minutes spent. I would like to count all the entries that
fall
between the hrs of 8:00 AM and 8:59 AM IF there are entries in both column
b
and c. If there are not entries in both col B and col C, I want to
disregard
those items. Help would be appreciated.