+ Reply to Thread
Results 1 to 3 of 3

24 hour lookback - flight time tracker for pilots

  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    Worcester, MA, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question 24 hour lookback - flight time tracker for pilots

    Each row in the attachment shows the ending time of a flight (col H). It also shows how long it's been since the previous flight ended - that's the rest time (col K).

    I'd like to look back at all flights that ended within 24 hours of the current row and see if the rest time on any of them are 10 hours or more. The idea is that you must show at least 10 hours of rest in the 24 hours preceding the end of a flight.

    I'd like col L to indicate whether 10 hours of rest can be found as described above. I have an incorrect attempt in col L. I realize that's just wrong.

    Since the number of rows within 24 hours of any given end-of-flight can vary, I'm not sure where to start.
    Attached Files Attached Files
    Last edited by KenBrown; 08-16-2012 at 07:42 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: 24 hour lookback - flight time tracker for pilots

    cant open your file (2003) but try something like...

    if(H1-K1<10,",ot enough rest","rested")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-15-2012
    Location
    Worcester, MA, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: 24 hour lookback - flight time tracker for pilots

    Thanks. I changed my file to .xls.

    On every row I need to look at every row above that's within 24 hours of the current flight ending time and determine whether any of those rows shows a rest time of 10 hours or more. The trick is in selecting the rows that meet the 'in the last 24 hours' criteria. The basic idea for the selection is ROWS-WHOSE-FLIGHT-TIME-IS <= CURRENT-FLIGHT-TIME .AND. ROWS-WHOSE-FLIGHT-TIME-IS > (CURRENT-FLIGHT-TIME - 1) I need to check all those rows to see if any contain 10 or more rest hours.

    As you say, it would be pretty easy to check for more than 10 rest hours in any given row. The problem is that I don't know how to include a variable number of rows in my formula.
    Last edited by KenBrown; 08-16-2012 at 07:58 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1