+ Reply to Thread
Results 1 to 10 of 10

Removing Holiday's from date calculation

  1. #1
    Registered User
    Join Date
    11-07-2003
    Location
    CA
    Posts
    13

    Removing Holiday's from date calculation

    OK, I've been trying to remove holidays from a date calculation (already removed weekends, that i posted earlier), but I can;t seem to remove a range of dates (holidays) from the calculation.

    As of right now, I am stumped. Please see the attached file, and let me know if I can provide more input to the problem. Any help would be appreciated!

    Thanks

    Tim
    Attached Files Attached Files
    Last edited by Timjor; 02-15-2012 at 02:26 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Removing Holiday's from date calculation

    Take a look at the NETWORKDAYS function, where you can point to a holiday list and the function can take account of this. If you have XL2003 or earlier, you will need to install the Analysis ToolPak.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    11-07-2003
    Location
    CA
    Posts
    13

    Re: Removing Holiday's from date calculation

    NETWORKDAYS returns a number based on a range minus the holidays. If you take a look at the spreadsheet I attached to my original post, I need to return a date based on a date minus a qty of days. Unless I am missing something, the NETWORKDAYS won't return what I need.

    Thanks

    Tim

  4. #4
    Registered User
    Join Date
    11-07-2003
    Location
    CA
    Posts
    13

    Re: Removing Holiday's from date calculation

    Any help would be appreciated. Looking to subtract days from a date and exclude only a defined set of holidays. WORKDAYS works for the working week, but not if I want to include weekends and exclude holidays from the calculations.

  5. #5
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: Removing Holiday's from date calculation

    Hi
    As your data is not consistant I want to be clear
    As in the first solution you have changed 7/18/2012 to 7/16/2012 nut 7/18/2012 is not weekend nor it is included in the holidays.
    Please explain if after substrection day falls on week day or holiday go to next working day or go back
    Regards
    Mark the thread as solved if you are satisfied with the answer.


    In your first post under the thread tools.

    Mahju

  6. #6
    Registered User
    Join Date
    11-07-2003
    Location
    CA
    Posts
    13

    Re: Removing Holiday's from date calculation

    Hi Mahju - thanks for responding.

    OK, I have tried to clarify on the attached worksheet. I can do the calculation to exclude weekends and holidays using the WORKDAY function for processes that can only run on weekdays. I now need a calculation that will exclude holidays as 'working days' on the non WORKDAY functions. I hope the attached helps clarify.

    Thanks

    Tim
    Attached Files Attached Files
    Last edited by Timjor; 02-10-2012 at 07:56 PM.

  7. #7
    Registered User
    Join Date
    11-07-2003
    Location
    CA
    Posts
    13

    Re: Removing Holiday's from date calculation

    Can anyone help?

    Tim

  8. #8
    Registered User
    Join Date
    11-07-2003
    Location
    CA
    Posts
    13

    Re: Removing Holiday's from date calculation

    OK, solved it (eventually) thanks to a different forum. I wanted to post the solution here, so everyone can see it (if needed).

    Solution was:

    =WORKDAY.INTL(A1,-B1,"0000000",C1:C10)

    Where A1 is the end date
    B1 is the number of days for the process
    "0000000" is the string signifying all the days are working days
    C1:C10 is the holiday date range

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Removing Holiday's from date calculation

    Note that it helps if you specify which version you are using - that formula will only work in Excel 2010 and most contributors here probably won't suggest that unless you specifically indicate you are using Excel 2010

    This "array formula" should do the job in earlier versions

    =A1-SMALL(IF(COUNTIF(C$1:C$10,A1-ROW(INDIRECT("1:"&COUNT(C$1:C$10)*B1+B1)))=0,ROW(INDIRECT("1:"&COUNT(C$1:C$10)*B1+B1))),B1)

    confirmed with CTRL+SHIFT+ENTER
    Audere est facere

  10. #10
    Registered User
    Join Date
    03-06-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Removing Holiday's from date calculation

    It would be helpful if someone let me know how to use WORKDAY.INTL function in excel 2007.

    Thanks,

    Vivek








    Quote Originally Posted by daddylonglegs View Post
    Note that it helps if you specify which version you are using - that formula will only work in Excel 2010 and most contributors here probably won't suggest that unless you specifically indicate you are using Excel 2010

    This "array formula" should do the job in earlier versions

    =A1-SMALL(IF(COUNTIF(C$1:C$10,A1-ROW(INDIRECT("1:"&COUNT(C$1:C$10)*B1+B1)))=0,ROW(INDIRECT("1:"&COUNT(C$1:C$10)*B1+B1))),B1)

    confirmed with CTRL+SHIFT+ENTER

+ 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