+ Reply to Thread
Results 1 to 7 of 7

Calculate Complete by Date based on a Schedule

  1. #1
    Registered User
    Join Date
    07-05-2023
    Location
    US
    MS-Off Ver
    Office 365
    Posts
    3

    Question Calculate Complete by Date based on a Schedule

    I cannot seem to figure out how to write a formula in column J to calculate the complete by date.

    Context:
    The Complete by date should be calculated by using the Category & the Due Date from Table 2 & matching that up with the Check Run schedule in Table 1. Basically, the Complete by date should be 1 business day (M-F) before the next check run (check run is indicated by an X and some categories have multiple check runs in the same week). Special Note: If the Due Date is on the same day as a check run, then the previous check run date will need to be referenced to calculate the Complete by date. The reasoning for this is that check runs are done in the morning so completing the task in the afternoon means the check would be late as it would miss the same day check run.

    Column J is what I need a formula for, but it currently indicates what I would expect the formula to return based on the Category and Due Date. I added a pic of a calendar for easier reference. I will give a few examples below that further explain the formula logic I am looking for.

    Complete By Date Based on CheckRun Schedule.png

    Example 1 (Cell J3):
    Due date = 6/8/23. In order to hit this goal, the complete date needs to be 1 business day before the closest check run. Since the closest check run is on Monday (6/5), the complete date needs to be 1 business day prior which is where 6/2/23 comes from.

    Example 2 (Cell J3):
    This example utilizes the special note above. Due Date = 6/12/23. In order to hit this goal, the complete date needs to be 1 business day before the closest PREVIOUS check run. Since the closest PREVIOUS check run is on Monday (6/5/23), the complete date needs to be 1 business day prior which is where 6/2/23 comes from.

    Example 3 (Cell J10):
    This example utilizes the special note above. Due Date = 6/6/23. In order to hit this goal, the complete date needs to be 1 business day before the closest PREVIOUS check run. Since the closest PREVIOUS check run is on Thursday (6/1/23), the complete date needs to be 1 business day prior which is where 5/31/23 comes from.

    Example 4 (Cell J16):
    This example utilizes the special note above. Due Date = 6/9/23. In order to hit this goal, the complete date needs to be 1 business day before the closest PREVIOUS check run. Since the closest PREVIOUS check run is on Thursday (6/8/23), the complete date needs to be 1 business day prior which is where 6/7/23 comes from.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,181

    Re: Calculate Complete by Date based on a Schedule

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Calculate Complete by Date based on a Schedule

    Please try in J3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Calculate Complete by Date based on a Schedule

    Or in a table, please try in J3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-05-2023
    Location
    US
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Calculate Complete by Date based on a Schedule

    HansDouwe,
    Both of these solutions are exactly what I was looking for....thank you so much!!

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Calculate Complete by Date based on a Schedule

    Thanks for the feedback and rep . Glad to have helped.
    It was an interesting problem to solve, form which I also learned .

  7. #7
    Registered User
    Join Date
    07-05-2023
    Location
    US
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Calculate Complete by Date based on a Schedule

    A new scenario has just came up regarding this same topic. I've been using the solution above flawlessly for the last couple of months. The data from Table 2 had to be exported into Excel on a daily basis which is why I was originally looking for a solution in an Excel formula. Recently, I have been able to get the data from Table 2 via a database connection in Power Query. With that said, I'm now looking to get the exact same solution, but in Power Query instead of an Excel formula.

    I've taken a few steps to doing this in Power Query, but I'm just not quite there yet. I may be completely off track in my method. The circled column (Custom.1 from Power Query) needs to match the circled column (Column J from Excel).

    Screenshot 2023-08-24 124132.png

    Here's the advanced editor code:
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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] Need a formula to calculate overtime based on a Shift schedule
    By trhuus in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-12-2023, 06:15 PM
  2. Calculate next Scheduled Service date based off a regular schedule
    By kgagnon1990 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-01-2019, 07:24 PM
  3. [SOLVED] If Date Field Populated, Calculate % complete for task
    By msvoboda27 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2018, 07:15 AM
  4. Replies: 3
    Last Post: 02-09-2016, 07:59 PM
  5. Calculate committed inventory total based on BOMs and a schedule
    By padra2001ca in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-05-2015, 06:23 AM
  6. Calculate remaining complete months in a financial year after a date
    By RichardBl in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 08-28-2014, 10:14 AM
  7. Replies: 5
    Last Post: 07-04-2013, 03:04 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