IF function for time - Page 2
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: IF function for time

  1. #11
    MrExcel MVP Barrie Davidson's Avatar
    Join Date
    Feb 2002
    Location
    Winnipeg
    Posts
    2,330
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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?
    Barrie Davidson

    "You're only given a little spark of madness. You mustn't lose it." - Robin Williams

  2. #12
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    81,827
    Post Thanks / Like
    Mentioned
    12 Post(s)
    Tagged
    1 Thread(s)

    Default

    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)

    Aladin


  3. #13
    Board Regular Brian from Maui's Avatar
    Join Date
    Feb 2002
    Posts
    8,445
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Barrie,

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

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

    Mahalo Barrie and Dave.....

    Aladin, I'll try yours too!

    Brian

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

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com