View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dribler2 dribler2 is offline
external usenet poster
 
Posts: 96
Default Workday function linked in an argument of If formula.

your formula works for my application,
=WORKDAY(A1,B1+(WEEKDAY(WORKDAY(A1,B1),2)=6))

thanks a lot, with the above, i get rid of being trapped on a non-wokday
result for the crucial end date of my schedule.

wish more reply from you..

happy holidays hohoho
driller:)


"Ron Rosenfeld" wrote:

On Sat, 23 Dec 2006 11:46:01 -0800, dribler2
wrote:

Thanks for the help.

leaving disputes on Workday() function, another formula may fit me based on
your table below.

Day of week Days to Add WeekDay of the Result
Sat 0 next Mon
Sat 2 next Tues
Mon 0 Mon
Mon 2 Wed
Fri 0 Fri
Fri 2 Tues


i can read short formula.

happy holidays hohoho
driller


Well, you set up some special circumstances which need to be accounted for.

For example


Sat `0 Next Monday
Sat 2 Next Tues

implies
Sat 1 next Monday

So there are two different "days to add" to the same date that result in the
same result.

And also "days to add" has a different meaning, in your requirements, depending
on whether or not the "base" is a weekday.

Here's one way:

=WORKDAY(A1,B1+(WEEKDAY(WORKDAY(A1,B1),2)=6))

and possibly (not thoroughly checked):

=WORKDAY(A1,B1+(WEEKDAY(WORKDAY(A1,B1,Holidays),2) =6),Holidays)





--ron