View Single Post
  #7   Report Post  
Frank Kabel
 
Posts: n/a
Default

Bob
lol
good thing Formula was already nearly ready to copy and paste. Just
replacing the correct weekday check was all that was needed.
Also this was a nice challenge that it is feasible. Now I'm only waiting for
Harlan to simplify this formula ;-)

"Bob Phillips" wrote:

Mr Kabel,

That is a fantastic formula, but I think you must be sadder even than I to
spend time working all that through :-)

Bob

"Frank Kabel" wrote in message
...
Hi
a formula solution (if you don't want to use a VBA UDF function):

=start_date+IF(days=0,0,SIGN(days)*SMALL(IF((WEEKD AY(start_date+SIGN(days)*(
ROW(INDIRECT("1:"&ABS(days)*10))),2)<7)*ISNA(MATCH (start_date+SIGN(days)*(RO
W(INDIRECT("1:"&ABS(days)*10))),holidays,0)),ROW(I NDIRECT("1:"&ABS(days)*10)
)),ABS(days)))

This is an array formula to be entered with CTRL+SHIFT+ENTER. So in your
example use:

=A1+IF(A2=0,0,SIGN(A2)*SMALL(IF((WEEKDAY(A1+SIGN(A 2)*(ROW(INDIRECT("1:"&ABS(
A2)*10))),2)<7)*ISNA(MATCH(A1+SIGN(A2)*(ROW(INDIRE CT("1:"&ABS(A2)*10))),holi
days,0)),ROW(INDIRECT("1:"&ABS(A2)*10))),ABS(A2)))

and ofr holidays insert the range containing your holiday dates

--
Regards
Frank Kabel
Frankfurt, Germany

kippi3000 wrote:
How do I include Saturdays to be counted in the WORKDAY function?

Assuming A1 is the start date, A2 is the duration, and B5:B10 is the
holiday range, what should I put as the formula so that in A3, the
end date would be calculated to give me the WORKDAY function, but
including the Saturdays? currently, if i use the workday function in


=IF(WEEKDAY(WORKDAY(A1,A2,B5:B10)-1,1)=1,WORKDAY(A1,A2,B5:B10)-3,WORKDAY(A1,
A2,B5:B10)-1)

it would give me the end date of the program after measuring the
duration from the start date, (start date inclusive). However, I need
to have it include saturdays. is there another way? or should I
modify this formula?