View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Wykedguy
 
Posts: n/a
Default Set a date as a constant to work back from to show only weekda



"Ron Rosenfeld" wrote:

On Sun, 8 Jan 2006 21:46:27 -0600, Vito
wrote:


Try

=WORKDAY(A1,-11)

Where A1 contains date to count back from, e.g. Feb 1, 06

You will need the Analysis Toolpak Addin Installed.


The OP wanted to subtract 11 days, and then adjust for weekends. Your formula
gives a result of Tuesday, Jan 17, 2006 given his data; not the Friday, Jan 20,
2006 he specified.


--ron


Try this

a1 Date ( 1st Feb )
a2 No Days (-11)
a3 Result (23rd Feb)
a4 formula =IF(WEEKDAY(C1)=1,C1-2,IF(WEEKDAY(C1)=7,C1-1,C1))

This checks if result is a Sun and takes 2 days of or Sat and takes one day
off, otherwise result is a workday.