+ Reply to Thread
Results 1 to 6 of 6

Number of days between two dates without Holidays

  1. #1
    Registered User
    Join Date
    03-12-2012
    Location
    US
    MS-Off Ver
    2007, 2010
    Posts
    43

    Number of days between two dates without Holidays

    I tried to do a search for an answer to my question but was unable to find one, so here we go...

    I need to count the number of days between 2 dates but exclude Holidays (I specify in a list). I don't want workdays, I need calendar days.

    The number of days between the two dates I have (that is easy), I am having trouble with excluding the list of dates when the dates fall within the range I am subtracting from one another.

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

    Re: Number of days between two dates without Holidays

    If you have start date in A2, emd date in B2 and holidays in H2:H10 then try this formula to get the number of non-holiday dates (including both A2 and B2)

    =SUMPRODUCT(ISNA(MATCH(ROW(INDIRECT(A2&":"&B2)),H$2:H$10,0))+0)
    Audere est facere

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Number of days between two dates without Holidays

    Sorry, already answered

  4. #4
    Registered User
    Join Date
    03-12-2012
    Location
    US
    MS-Off Ver
    2007, 2010
    Posts
    43

    Re: Number of days between two dates without Holidays

    Tried it and the formula is only subtracting one day from the calculated total.

    I put 1/1/12 into A2 and 1/1/13 into B2 with 6 dates in the H column range and I get a total of 366. Without the dates in the H column I get 367.

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

    Re: Number of days between two dates without Holidays

    OK, silly question....are all the 6 holiday dates in 2012? Are you sure they are valid dates?

    See my example attached
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-12-2012
    Location
    US
    MS-Off Ver
    2007, 2010
    Posts
    43

    Re: Number of days between two dates without Holidays

    Turns out if is not a silly question...my mistake they all feel outside the date range being calculated...I feel rather silly, my apologies. The formula works flawlessly...once I put the correct information into the correct fields, thank you.

+ 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