Hi,
My users have a task that takes 5 days to complete. I need to identify whether the completion date falls on a saturday or a sunday. If it falls on a sunday, the task needs to be moved back 2 days, and 1 day for a saturday.
Does anyone know how to do this? Thanks in advance,
Michael
Moved to correct forum!
Not all forums are the same - seek and you shall find
Try the WORKDAY formula (2007? can't remember if its there for earlier versions). This allows you to point to a start date in a cell, then point to a cell that has number of days it takes to complete the project, and will calculate an 'end date' that is a workday (skips saturday/sunday). The formula also gives you a way to build-in skipping of holidays as well, if you need that.
In this example, A1 is your start date, B1 is the number of days you expect the project to take to complete, and the range C1:C10 is where you can put holidays that you want to 'skip' as well (holidays formatted as 'general', not as 'date'). The formula returns the 'end date', skipping weekends and holidays, that you're looking for, I believe.=WORKDAY(A1,B1,C1:C10))
Hope that helps!
Last edited by jwhitwell; 07-15-2008 at 02:18 PM.
Two options:
1. Use the formula =WEEKDAY(...) to return a number between 1-7.
2. The other option is to put in B1: =A1 and then 'Custom format' (right click Formalt Cells..., Tab: Number, Category: Custom. Set Type to DDDD which will give you the format for example Sunday.
HTH
Ola
There's a difference between adding 5 days to a date and then jumping to the next weekday if the result isn't one....and just adding 5 workdays to a date. For example the former gives a Monday end date for a Tuesday start, the latter gives a Tuesday end date.
You describe it as the former which would be
=WORKDAY(A1+4,1)
If it's the latter
=WORKDAY(A1,5)
For versions of Excel before 2007 WORKDAY is an Analysis ToolPak function
...or without Analysis ToolPak function this will do the same as the first formula above
=CHOOSE(WEEKDAY(A1+5),1,0,0,0,0,0,2)+A1+5
Last edited by daddylonglegs; 07-15-2008 at 04:32 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks