View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Calculate next workday after adding calendar days to date in c

Chip,

I played with that but here's my understanding

a1= 1 Jan 2010

and nothing in the holidays range

A1+100 returns 11/4/2010 which is a Sunday so we need to add one day. Both
your formula and mine return Monday 12/4/2010, exactly what the OP wants.

Now we add a holiday date of (say) 1 Feb 2010 in the holiday range. My
formula advances to 13/4/2010 but yours still returns 12/4/2010, in fact it
doesn't seem to respond to any amount of dates in the holiday range. I'm
still sure there's a simpler way but unless i corrected the typo in your
formula incorrectly then this doesn't seem to be the answer.




--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Chip Pearson" wrote:


That could finish on a weekend date. There must be a simpler way but until
then try this monstrosity


There is.

=WORKDAY(A1+100,--(WEEKDAY(A1+100,11)5),Holidays)

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]




On Wed, 5 May 2010 13:28:03 -0700, Mike H
wrote:

Hmmm,

That could finish on a weekend date. There must be a simpler way but until
then try this monstrosity

=A1+100+CHOOSE(WEEKDAY(A1+100,2),0,0,0,0,0,2,1)+S UMPRODUCT((Holidays=A1)*(Holidays<=A1+(100+SUMPRO DUCT((Holidays=A1)*(Holidays<=A1+100)))))+CHOOSE( WEEKDAY(A1+100+CHOOSE(WEEKDAY(A1+100,2),0,0,0,0,0, 2,1)+SUMPRODUCT((Holidays=A1)*(Holidays<=A1+(100+ SUMPRODUCT((Holidays=A1)*(Holidays<=A1+100))))),2 ),0,0,0,0,0,2,1)

.