View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default formual to determine if date falls on weekend, adjust date to Mond

On Fri, 21 Nov 2008 08:15:00 -0800, Bradley
wrote:

Hi I am using excel to show project timeline. I want to determine if the day
falls on saturday or sunday. If the day of week falls on the weekend I will
add the appropriate number of days to bring the new date to the start of the
work week.

basically I have a cell with my starting date, then add the number of days
of work expected and get an ending date. if the ending date falls on a
weekend then I want to adjust the ending date appropriately.

for example;
if (day=saturday) day=day+2
if (day=Sunday_)day=day+1

thanks for your help

Bradley


Something like:

=WORKDAY(A1+A2-1,1)

where A1 is your start date, and A2 is the numboer of days of work expected.

Note that if you only want to add working days, then you should use:

=workday(a1,a2)

Also note that there is an optional Holidays argument (see HELP).

If the WORKDAY function -- #NAME error, see HELP for that function for
instructions on how to correct it.
--ron