+ Reply to Thread
Results 1 to 3 of 3

Calendar calculations excluding specific dates

  1. #1
    Registered User
    Join Date
    09-30-2006
    Posts
    1

    Calendar calculations excluding specific dates

    Hi,

    I'm preparing a project schedule by adding number of days to certain dates, but would like to exclude a list of specific dates (ie Sundays and holidays) in the calculation.

    Workday function doesn't help me as it excludes both Saturdays and Sundays.

    Any help is appreciated.

    Thanks!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    This might give you half the solution. Say A1 has your start date then enter this in A2 and drag down

    =IF(WEEKDAY(A1+1)=1,A1+2,A1+1)

    It ignores Sunday's. Paste special value's

    Then you could either make a small table of Holiday dates and do a vlookup to flag holdiays and filter on the helper column to delete

    VBA Noob

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Not particularly simple to do but you could use this formula

    =SMALL(IF((WEEKDAY(ROW(INDIRECT(A2+1&":"&WORKDAY(A2,B2,G$1:G$10))))<>1)*(ISNA(MATCH(ROW(INDIRECT(A2+1&":"&WORKDAY(A2,B2,G$1:G$10))),G$1:G$10,0))),ROW(INDIRECT(A2+1&":"&WORKDAY(A2,B2,G$1:G$10)))),B2)

    confirmed with CTRL+SHIFT+ENTER

    where A2 is the start date, B2 the number of days to add and G1:G10 contains holiday dates

+ 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