Using time in conditional formulas

J

josie

I'd like to analyze data by time period and don't know how to use time
in conditional formulas I've been using ... like:
=SUM(($D$3:$D$4403>0)*($D$3:$D$4403<4)*1). Ideally, I'd like to be able
to using multi-condition formulas, with one criterion being time (to
look at data by time period).

Example of monster equation: =AVERAGEA(IF('Data Entry
Sheet'!B3:B66=1,IF('Data Entry Sheet'!AP3:AS66>0,IF('Data Entry
Sheet'!AP3:AS66<9,'Data Entry Sheet'!AP3:AS66),(IF('Data Entry
Sheet'!B3:B66=1,IF('Data Entry Sheet'!AU3:AV66>0,IF('Data Entry
Sheet'!AU3:AV66<9,'Data Entry Sheet'!AU3:AV66)))))))

Yeah, I know it's ugly.

Can anyone help me understand how to use time in a conditional
formula??
 
P

Paul

josie said:
I'd like to analyze data by time period and don't know how to use time
in conditional formulas I've been using ... like:
=SUM(($D$3:$D$4403>0)*($D$3:$D$4403<4)*1). Ideally, I'd like to be able
to using multi-condition formulas, with one criterion being time (to
look at data by time period).

Example of monster equation: =AVERAGEA(IF('Data Entry
Sheet'!B3:B66=1,IF('Data Entry Sheet'!AP3:AS66>0,IF('Data Entry
Sheet'!AP3:AS66<9,'Data Entry Sheet'!AP3:AS66),(IF('Data Entry
Sheet'!B3:B66=1,IF('Data Entry Sheet'!AU3:AV66>0,IF('Data Entry
Sheet'!AU3:AV66<9,'Data Entry Sheet'!AU3:AV66)))))))

Yeah, I know it's ugly.

Can anyone help me understand how to use time in a conditional
formula??

I will not try to address the detail of your situation, but just answer the
last sentence.
Instead of using a number in a comparison, you can use a time value, for
example A1<TIME(16,30,0).
The TIME function is like this: TIME(hours,minutes,seconds).
So, for example,
=IF(A1<TIME(16,30,0),1,2)
will give the result 1 if A1 contains a time before 16:30:00 and 2
otherwise.
 

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