View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Darrell[_2_] Darrell[_2_] is offline
external usenet poster
 
Posts: 14
Default Calculate next workday after adding calendar days to date in c

Hi Mike

Great effort on my part. I tried the formula below using the fx insert
function but its seems to be counting twice. I wasn't able to substitute the
propert cells in your monster below.

=B3+100+NETWORKDAYS(B3,100,D2:D18)

Thanks in advance.
Darrell

"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)+SU MPRODUCT((Holidays=A1)*(Holidays<=A1+(100+SUMPROD UCT((Holidays=A1)*(Holidays<=A1+100)))))+CHOOSE(W EEKDAY(A1+100+CHOOSE(WEEKDAY(A1+100,2),0,0,0,0,0,2 ,1)+SUMPRODUCT((Holidays=A1)*(Holidays<=A1+(100+S UMPRODUCT((Holidays=A1)*(Holidays<=A1+100))))),2) ,0,0,0,0,0,2,1)
--
Mike

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


"Mike H" wrote:

Darrell,

One way. Holidays is a named range containing your holiday dates

=A1+100+CHOOSE(WEEKDAY(A1+100,2),0,0,0,0,0,2,1)+SU MPRODUCT((Holidays=A1)*(Holidays<=A1+(100+SUMPROD UCT((Holidays=A1)*(Holidays<=A1+100)))))

--
Mike

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


"Darrell" wrote:

I want to add 100 calendar days to a date in a cell and when that date falls
on a weekend or holiday the formula will return the next workday vs.
returning a weekend date.

I tried the workday function but it counted 100 workdays not calendar days.

Thanks in advance