+ Reply to Thread
Results 1 to 12 of 12

Calculate latest date from two columns with exceptions

  1. #1
    Registered User
    Join Date
    04-09-2009
    Location
    Florida
    MS-Off Ver
    Excel 16.3 for Mac
    Posts
    15

    Calculate latest date from two columns with exceptions

    Hi all



    I've been working on creating my own pilot logbook so I have a little more control and customization with data. I'm currently stuck calculating landing currencies.



    For day landings you must have completed 3 or more landings within 90 calendar days during the day. This is column W.

    For night landings you must have completed 3 more more landings within 90 calendar days at night. This is column X.



    If current, calculate +90 days. The caveat here is that day landings do NOT count for night, however night landings DO count for day.



    I have attached an example spreadsheet. On the Summary tab I have two fields I need to simply tell me when currency (date) expires for day landings and night landings. My night landings seem to be calculating accurately (to the extent of my testing) however my day landings are incorrect:



    In the demo my last eligible night landings were 10/1/2020 - excel should show me 12/30/2020 - which it does.

    My last eligible day landings were 11/1/2020 - excel should show me 1/30/2021 - it does not. Instead it's seeing 12/30/2020.



    Either my formula contains an error which I can't figure out or my formula is just massively incorrect.



    Tips or help would be appreciated. Cheers!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,604

    Re: Calculate latest date from two columns with exceptions

    dynamic/auto adjusting named ranges:

    Flt.Date ='Flight Logbook'!$B$7:INDEX('Flight Logbook'!$B:$B,COUNT('Flight Logbook'!$B:$B)+6)
    Flt.Day ='Flight Logbook'!$W$7:INDEX('Flight Logbook'!$W:$W,COUNT('Flight Logbook'!$B:$B)+6)
    Flt.Night ='Flight Logbook'!$X$7:INDEX('Flight Logbook'!$X:$X,COUNT('Flight Logbook'!$B:$B)+6)
    ---------------------------
    summary formulas**:
    Please Login or Register  to view this content.
    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Last edited by protonLeah; 11-08-2020 at 02:23 PM.
    Ben Van Johnson

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Calculate latest date from two columns with exceptions

    Please try
    Day
    =LOOKUP(2,1/('Flight Logbook'!$W$8:$W$30>2),'Flight Logbook'!B$8:B$30)+90

    Night
    =LOOKUP(2,1/('Flight Logbook'!$X$8:$X$30>2),'Flight Logbook'!B$8:B$30)+90
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-08-2020
    Location
    Srilanka
    MS-Off Ver
    2016
    Posts
    1

    Re: Calculate latest date from two columns with exceptions

    Plz Try these functions..

    * After insert bellow functions you should press Ctrl + Shift + Enter

    Day landing : =MAX(IF('Flight Logbook'!W8:W19>2,'Flight Logbook'!B8:B19))+90
    Night Landings : =MAX(IF('Flight Logbook'!X8:X19>2,'Flight Logbook'!B8:B19))+90

    * When you are entering more data you have to change columns range
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-09-2009
    Location
    Florida
    MS-Off Ver
    Excel 16.3 for Mac
    Posts
    15

    Re: Calculate latest date from two columns with exceptions

    Thanks guys! I'll try these out now.

    At first glance I'm not seeing night landings counting for day currency, but maybe I've overlooked something. Cheers

    EDIT: Ok I see how you all came up with your formulas, and technically they are correct. The issue I am having is making the Day Currency formula look for the 3 or more 90-day cumulative night landings in addition to day landings to count currency expiration date. FAA regulations count 3+ night landings within 90 days for day in addition to any day landings performed. Day landings do not count for night.
    Last edited by madman411; 11-09-2020 at 03:48 PM.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: Calculate latest date from two columns with exceptions

    As the night landing formula is working I didn't work on that one.
    As for the day landing array entered formula**, the following yields the expected date (1/30/2021):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    04-09-2009
    Location
    Florida
    MS-Off Ver
    Excel 16.3 for Mac
    Posts
    15

    Re: Calculate latest date from two columns with exceptions

    Quote Originally Posted by JeteMc View Post
    As the night landing formula is working I didn't work on that one.
    As for the day landing array entered formula**, the following yields the expected date (1/30/2021):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Let us know if you have any questions.
    That array formula worked a treat! All the applicable dates now calculate correctly. Thanks buddy!

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: Calculate latest date from two columns with exceptions

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

  9. #9
    Registered User
    Join Date
    04-09-2009
    Location
    Florida
    MS-Off Ver
    Excel 16.3 for Mac
    Posts
    15

    Re: Calculate latest date from two columns with exceptions

    Quote Originally Posted by JeteMc View Post
    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.
    How can I mark this as solved? I don't see the option.

    I do have another question though. I found a different error in another date calculation.

    I need to calculate single engine (SEL) currency but I believe it will be similar to the array formula you came up with with only a minor change I would hope.

    Single Engine Land (SEL) currency only requires 3 takeoffs and 3 landings within 90 calendar days within that category. The previous formula looks at the logbook as a whole, which is correct. This calculation needs to limit what data is calculated based on if data is in the SEL column (column H) or blank.

    TL;DR In the demo spreadsheet under the Flight Logbook tab I need to look at 3 takeoffs and landings within 90 days (again, night counts for day and day does not count for night) and look to see if a value in column H has a value (which would define the flight as single engine, or "SEL") to make sure the calculation accounts for what Aircraft Category was flown. The calculation should omit MEL (column I) then add 90 days to show when "currency" will expire.

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: Calculate latest date from two columns with exceptions

    Try the following array entered formulas**:
    For Day Landing:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    For Night Landing:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.

  11. #11
    Registered User
    Join Date
    04-09-2009
    Location
    Florida
    MS-Off Ver
    Excel 16.3 for Mac
    Posts
    15

    Re: Calculate latest date from two columns with exceptions

    Quote Originally Posted by JeteMc View Post
    Try the following array entered formulas**:
    For Day Landing:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    For Night Landing:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    JeteMc, that did the trick. Thank you for your help.

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: Calculate latest date from two columns with exceptions

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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] Calculate to the latest date & ignore the previous
    By chaiyya345 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-21-2020, 02:15 AM
  2. Replies: 4
    Last Post: 07-17-2017, 09:46 AM
  3. [SOLVED] Plot for the last value latest date in selected columns
    By Sekars in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-07-2016, 02:09 AM
  4. Replies: 3
    Last Post: 12-08-2015, 11:36 AM
  5. Replies: 8
    Last Post: 04-08-2015, 10:10 PM
  6. [SOLVED] Calculate sum based on partial text match and latest date
    By moondog1023 in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 06-20-2014, 04:02 PM
  7. Replies: 0
    Last Post: 06-03-2011, 08:45 AM

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