+ Reply to Thread
Results 1 to 4 of 4

Need help with formula to calculate totals, messed up by repeated dates -FlightDuty Period

  1. #1
    Registered User
    Join Date
    04-07-2014
    Location
    Maldives
    MS-Off Ver
    Excel 2007
    Posts
    5

    Question Need help with formula to calculate totals, messed up by repeated dates -FlightDuty Period

    Hi, everyone. I am a flight dispatcher who is having difficulty with a Flight Duty Period tracking sheet. I need a formula which gives me the total hours done by a pilot (column H) in the PREVIOUS 'x' days.

    I have attached the excel file, in black font are raw data which I enter daily. Please download file and open the FDP tab from the file and goto cell Z78.

    Basically I need a formula in cell Z78, which checks up the date on column D78 and selects a date range of the PREVIOUS 'x' days from the date in D78 (in this case 7 days) and give a sum of hours from the adjacent cells in column P.

    Please note that I want the formula to automatically check the cells in column D for the dates, not manually select the dates, because pilots do one flight per day sometimes and it is never same. Formula should be able to be used for other pilots too.

    Repeating dates on column D is making it complicated for me, I am sure you guys would be able to help. Please reply at your earliest convenience.
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: Need help with formula to calculate totals, messed up by repeated dates -FlightDuty Pe

    does this work for you

    =SUMIFS(P:P,D:D,">="&D78-7,D:D,"<="&D78)

    add all the cells up in column P where the date in column D78 is equal to or greater than 7 days ago and less than or equal to D78

    answer is 68.5 - is that what you expected ?
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    04-07-2014
    Location
    Maldives
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Need help with formula to calculate totals, messed up by repeated dates -FlightDuty Pe

    Thank you for the prompt reply brother. You got me exactly what I needed, that formula works! Somehow I needed to change the formula to deduct 6 from D78, not 7. Deducting 7 gives a range of 8 days. Somehow I got it. 58:10 was the answer expected.

    One more thing to automate this sheet, can you explain me how to generate a separate tab like "FDP" for each Instructor (in column H) inside this sheet so that every flight is sorted by date. Is it possible??? You can use the same excel file for explanation.

    I think I have wasted a lot of years not joining this forum, we have a lot of help here. Thanks

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: Need help with formula to calculate totals, messed up by repeated dates -FlightDuty Pe

    it will probably be best to use VBA to extract into different sheets, then you can have the sheet tab named with the student and it shouldbe able to be setup for whatever names exist on the main sheet.

    I would suggest starting a new thread for that requirement , as VBA is not my expertise

    if my assistance has helped, and only if you wish to , there is a reputation icon * on the left hand side - you can add to my reputation here

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Automatic Withdrawls: Calculate future dates, convert to workday, which pay period
    By Canuck 'Eh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-23-2014, 12:23 PM
  2. Replies: 1
    Last Post: 04-24-2013, 11:38 PM
  3. [SOLVED] Complicated:Calculate time period based on no. of units sold + fluctuations within period
    By omaha.crab in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 03:04 AM
  4. Replies: 15
    Last Post: 09-16-2009, 12:02 PM
  5. Replies: 5
    Last Post: 08-06-2009, 05:17 PM

Tags for this Thread

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