Can I calculate 30 calendar days from a given date, excluding holidays that I specify?

Anonymous
2010-06-04T20:34:51+00:00

I'm looking for something similar to the WORKDAY function, except I want it to return dates that include weekends (but not holidays that I specify).

Thanks for your advice!

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

44 answers

Sort by: Newest
  1. Anonymous
    2010-06-05T21:21:26+00:00

    A1: Start date

    A2: number of days to be add

    A3:A4 holidays

    =A1+A2+SUMPRODUCT(--ISNUMBER(MATCH(ROW(INDIRECT(A1&":"&A1+A2)),A3:A4,0)))

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-06-05T20:46:09+00:00

    On Fri, 4 Jun 2010 20:34:51 +0000, kaylith

    <Email removed for privacy>

    wrote:

    >

    >

    >I'm looking for something similar to the WORKDAY function, except I want it to return dates that include weekends (but not holidays that I specify).

    =StartDate+DaysToAdd+SUMPRODUCT(COUNTIF(Holidays,

    ROW(INDIRECT(StartDate&":"&INDIRECT(CELL("address"))))))

    OOPS,

    That formula should be:

    B1:

    =StartDate+DaysToAdd+SUMPRODUCT(

    COUNTIF(Holidays,ROW(INDIRECT(StartDate&":"&B1))))

    Note I removed the cell("reference") construct and replaced it with the actual cell containing the formula.  The first version was for some testing.

    Hello Ron,

    Have you ever used iterations in a serious production environment? I do not mean a specialized math application which will only be run by experts.

    I found it far too dangerous for less experienced users because you will no longer see accidental circular references.

    That's why I put it on my Excel Dont's list: http://sulprobil.com/html/excel\_don\_ts.html , topic 5.

    Regards,

    Bernd


    www.sulprobil.com

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-06-05T19:16:33+00:00

    Mr. Pearson,

    I wonder you didn't remember the hereunder solution of yours(!):

       http://www.cpearson.com/Excel/BetterWorkday.aspx

    Micky (Microsoft® MVP - Excel)

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-06-05T19:03:35+00:00

    Here is a formula approach which is rather complex, but seems to work.  1. Assume your start date is in A1, and your list of holidays in C1:C10.  Also assume that there can be a max of 3 holidays in any 35 consecutive days.  then in D1 enter the following array** formula:

    =IF(ISERR(SMALL(IF((C$1:C$10>=A$1)*(C$1:C$10<=A$1+40),C$1:C$10,""),ROW(A1))),"",SMALL(IF((C$1:C$10>=A$1)*(C$1:C$10<=A$1+40),C$1:C$10,""),ROW(A1)))

    and copy it down 3 cells.  (the holidays we will look at are in column D.)  ** Array formula means you enter it by pressing Shift+Ctrl+Enter rather than Enter.

    In cell A2 we calculate the end date with the following array** formula:

    =A1+SMALL(IF((((A1+ROW(1:35))<>D$1)+((A1+ROW(1:35))<>D$2)+((A1+ROW(1:35))<>D$3)=3)*ROW(1:35)>0,(((A1+ROW(1:35))<>D$1)+((A1+ROW(1:35))<>D$2)+((A1+ROW(1:35))<>D$3)=3)*ROW(1:35),""),31)-1


    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers, Shane Devenshire

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2010-06-05T18:42:10+00:00

    On Fri, 4 Jun 2010 20:34:51 +0000, kaylith

    <*** Email address is removed for privacy ***>

    wrote:

    >

    >

    >I'm looking for something similar to the WORKDAY function, except I want it to return dates that include weekends (but not holidays that I specify).

    =StartDate+DaysToAdd+SUMPRODUCT(COUNTIF(Holidays,

    ROW(INDIRECT(StartDate&":"&INDIRECT(CELL("address"))))))

    OOPS,

    That formula should be:

    B1:

    =StartDate+DaysToAdd+SUMPRODUCT(

    COUNTIF(Holidays,ROW(INDIRECT(StartDate&":"&B1))))

    Note I removed the cell("reference") construct and replaced it with the actual cell containing the formula.  The first version was for some testing.

    Was this answer helpful?

    0 comments No comments