+ Reply to Thread
Results 1 to 7 of 7

List Dates Excluding Holidays but Including weekends

Hybrid View

  1. #1
    Registered User
    Join Date
    08-23-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    List Dates Excluding Holidays but Including weekends

    Hi,

    I am hoping someone might be able to help. I need to create a list of dates that increases by increments of one day but excludes certain dates in an array Labeled "Holiday".

    I know this can be done using Networkdays but I want to include weekends and only exclude the dates in the array.

    Any help would be greatly appreciated.

    Cheers,

    Guy

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: List Dates Excluding Holidays but Including weekends

    maybe

    =IF(ISNA(MATCH(A1+1,RangeHolidays,0)),A1+1,A1+2)

    copy down.

    where RangeHolidays is a named range of cells that lists the holiday dates, and holidays are only single dates, not several consecutive dates.
    Last edited by teylyn; 09-22-2010 at 05:34 AM.

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: List Dates Excluding Holidays but Including weekends

    this formula caters for situations where two consecutive days can be holidays, like Dec-25 and Dec-26 in countries that observe Christian holidays.

    =IF(ISNA(MATCH(A1+1,$E$1:$E$5,0)),A1+1,IF(ISNA(MATCH(A1+2,$E$1:$E$5,0)),A1+2,A1+3))

    The principle can be expanded to include up to 6 consecutive holidays given the maximum of seven nested IFs in Excel 2003.

  4. #4
    Registered User
    Join Date
    08-23-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: List Dates Excluding Holidays but Including weekends

    Brilliant that works, thank you very much for your help.

    Guy

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,713

    Re: List Dates Excluding Holidays but Including weekends

    You could cope with up to 4 consecutive holidays with this version

    =A1+MIN(IF(COUNTIF(holidays,A1+{1,2,3,4,5}),"",{1,2,3,4,5}))
    Audere est facere

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: List Dates Excluding Holidays but Including weekends

    I'm expecting daddylonglegs to come up with something more efficient.

  7. #7
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: List Dates Excluding Holidays but Including weekends

    q.e.d.

    Thanks, DLL!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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