+ Reply to Thread
Results 1 to 4 of 4

Distribute value between Start & End Date but exclude a holiday break

  1. #1
    Registered User
    Join Date
    07-23-2012
    Location
    South Africa
    MS-Off Ver
    Excel 356
    Posts
    2

    Question Distribute value between Start & End Date but exclude a holiday break

    Hallo Members

    I have managed to create a spreadsheet (as attached) to distribute a construction project task costs between Start & End Dates, in order to generate a cashflow.

    My Question to the Forum:
    In the southern hemispheres we have a construction break generally between 15 December to 15 January, so I require a method to exclude this Time Period in the cashflow generation. In order words, there should not be any costs displayed during the break-period.

    Regards
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Distribute value between Start & End Date but exclude a holiday break

    I don't think nested ifs is the effective way to deal with tha. Note that even with no-holiday period (task 1) the calculations dont sum to total cost (column F).

    My proposition is to use the list of all days in a holiday period and use networkdays function. So having a list Dec 12 till Jan 15 in AV1:AV35 a formula in H7 (and copy down and right) could read:

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


    May look as long one but it consists of checking if a beginning of a week is in holiday period:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    (could be done also by simple testing two limiting dates, like
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    So if it is 0, we have result 0 and if not the main part:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The last part
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    is (I hope) obvious. It's our daily spending (CostToComplete/NumberOfWorkingDays)

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

    it is the last day of given week (start of week+5) or last day of work (we had to add 1 here, because otherwise task starting and ending the same day would be 0 day long), whichever of these two days is earlier
    and we take also a later date of the two (start date and beginning of given week
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    the difference between the two is the number of days worked in given week. But note that before startday or after endday we will have wrong results, namely: negative numbers. So we take only positive values using
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Check it out but first check your dates in E9 you have Jan 23rd 5PM. It would lead to wrong result in X9 (last week). The same mistake is in E10, but as it's the date during weekend makes no effect on results.

    PS. As you are using excel 365 the date range containing holidays could be dynamically created but I think it would make a formula even harder to read.
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    07-23-2012
    Location
    South Africa
    MS-Off Ver
    Excel 356
    Posts
    2

    Re: Distribute value between Start & End Date but exclude a holiday break

    Hi Kaper

    Thank you so much for your assistance. This works 110%

    Regards
    Pierre

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Distribute value between Start & End Date but exclude a holiday break

    Glad to hear about 110%

    So as that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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] Exclude lunch break in start and end time
    By itty in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-26-2021, 10:48 AM
  2. [SOLVED] Start Date + 8 Days but Can't End on a Weekend/Holiday
    By rebma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-21-2021, 11:11 AM
  3. Replies: 5
    Last Post: 02-14-2017, 04:27 PM
  4. [SOLVED] Start date must be next workday and non-holiday after previous task end date
    By Verdant in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-04-2015, 04:21 PM
  5. Networkdays with holiday - start date falls on a holiday
    By skexcelforum in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-09-2014, 01:47 AM
  6. [SOLVED] Date should exclude holiday which saved separately at sheet 2.
    By ExcelUser2707 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-21-2013, 01:26 AM
  7. Next valid date, exclude holiday / Sat / Sun
    By phil77 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-27-2010, 04:56 PM

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