Thanks:  0
Likes:  0

# Thread: IF function for time

1. On 2002-03-25 14:48, Brian from Maui wrote:
Barrie,

It works.
But...I know you all hate this...
instead of 475 I'd like to refer this to say
717 30 mins, D10 45 mins, 767 60 mins

Brian
Okay, my example assumes the aircraft type is in cell B1 and you have a lookup table in B6:C8 that has the aircraft type in column B and the time limit in column C (the time limit is just a regular number, not recognized as time by Excel).

=IF(OR(F1="",G1=""),"",IF((G1-F1)*1440>VLOOKUP(B1,\$B\$6:\$C\$8,2,0),1,0))

Does this help?

2. On 2002-03-25 14:41, Barrie Davidson wrote:
Brian, will this work for you?

=IF(OR(F1="",G1=""),"",IF(AND(G1-F1>45/1440,T1<>475),1,0))

This will return 1 if the time is greater than 45 minutes AND the aircraft type (in cell T1) is not equal to 475.

Regards,
If what is desired is to obtain a count how many times 475 has failed to stay within 45 mins, then:

=(COUNT(F1:G1)=2)*(G1-F1>45/1440)*(T1=475)

3. Barrie,

Yes it does, why didn't i think of a VLOOKUP.

Because........fill in the blank.

Mahalo Barrie and Dave.....

Brian

[ This Message was edited by: Brian from Maui on 2002-03-25 14:59 ]

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•