Countif in a time range

S

smcmoran

I have a list of 14,000+(DTTM) dates and times from a month, (i.e.9/1/2008
9:20:00 AM). I need to count how many rows have a time stamp between 08:00
and 17:00. I copied the column over one and formated it down to a 24 hour
time format. Is there a way to trim this column or write a formula that only
counts thte time?

Thanks
Scott
 
V

vezerid

Scott,

To just extract the time in a separate cell you can use either:
=A2-INT(A2)
=MOD(A2,1)

Applying the second formula to your conditional count:

=SUMPRODUCT((MOD(A2:A14000,1)>=TIME(8,0,0))*(MOD(A2:A14000,1)<TIME(17,0,0)))

HTH
Kostis Vezerides
 
S

smcmoran

Thank you very much. Now I have to take it one step further. I need to
count up cells that are in this range AND have another cell value(TEXT).
 
S

smcmoran

Thank you very much. Now I have to take it one step further. I need to
count up cells that are in this range AND have another cell value(TEXT).
 
V

vezerid

=SUMPRODUCT((MOD(A2:A14000,1)>=TIME(8,0,0))*(MOD(A2:A14000,1)<TIME(17,0,0))*(A2:A14000="TEXT"))

HTH
Kostis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top