+ Reply to Thread
Results 1 to 6 of 6

Need to calculate flying hours

  1. #1
    Registered User
    Join Date
    05-15-2005
    Posts
    3

    Need to calculate flying hours

    I have a pilot friend who needs to calculate his flying hours. After every seven days, he needs to know if he has crossed the limit of 30 hours. So I have created an Excel sheet for him where he can enter the number of hours he has flown every day. How do I set a formula to add the hours for every seven days and then another formula that tells him the number of hours left for the 30-hour limit or whether that limit has been crossed.
    There is a different limit for every 30 days as well, but once I know the 7-day calculation, I will be able to extrapolate that to calculate the 30-day figures.

  2. #2
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    assuming the dates are entered in a1:a1000, and the hours in b1:b1000

    put this in cell c1 and copy down

    =SUMPRODUCT((A1-$A$1:$A$1000<8)*(A1-$A$1:$A$1000>=0)*($B$1:$B$1000))

    it adds up all hours for which the date of the current row less other dates is <8 and >=0

    you could then format the cell with condition format to highlight if the value is > 30
    not a professional, just trying to assist.....

  3. #3
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    I just saw Duane had a solution...so this is an alternative:
    =IF(WEEKDAY(A2,2)=1,30-B2,D1-B2)

    Ola Sandström


    Encl. Picture
    Column C is Custom formatted: DDD to show the day of the week
    Change all ; to , if that is your normal standard
    Attached Images Attached Images
    Last edited by olasa; 05-15-2005 at 12:58 PM.

  4. #4
    Registered User
    Join Date
    05-15-2005
    Posts
    3
    What format should the hours be entered in? The hours are not whole numbers every time. They could be 5 hours 35 minutes on one day, 6 hours 15 minutes on another.
    I had entered them as 05:35:00, 06:15:00, etc. So when I put in the condition for 30 hours as >30, the formula is giving me vague answers and when I put the condition as 30:00:00 it returns an error.

  5. #5
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    Try to see if this works (see encl.)
    =IF(WEEKDAY(A3;2)=1;1,25-B3;D2-B3)

    Ola Sandström


    Note:
    1,25 is 30 hours in Excel time format (30/24=1,25)
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-15-2005
    Posts
    3
    Thanks Ola, this works. One more thing, though. Is this weekday dependent or can it be turned into an any-7-days scenario?

+ 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