Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to calculate next WORKDAY?
I need help with an IF statement/function for an Excel spreadsheet.
Here is what I am trying to do: If I have a date in a cell and it happens to be Saturday or Sunday, I want the IF statemnt to give the next WORKDAY. For example: 12//3/2005 Saturday The functin should look at this date, determne that is A WEEKEND date, then provide the next WORKDAY 12/05/2005 Monday. Any suggestions? The Tan Man |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to calculate next WORKDAY?
This is a bit of code that may help.
If Weekday(datCompletionDate, vbMonday) 5 Then While Weekday(datCompletionDate, vbMonday) 5 datCompletionDate = datCompletionDate + 1 Wend End If HTH, John |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to calculate next WORKDAY?
i have a function called WORKDAY() in my list of functions which does exactly that! example: if 12/03/2005 is in cell D6, the function '=workday(D6,1)' returns 12/05/2005 in whichever cell the function is entered ('1' being the number of workdays after the saturday). i think the function may have come from the analysis toolpack add-in. hth, Tim "The Tan Man" wrote in message oups.com... I need help with an IF statement/function for an Excel spreadsheet. Here is what I am trying to do: If I have a date in a cell and it happens to be Saturday or Sunday, I want the IF statemnt to give the next WORKDAY. For example: 12//3/2005 Saturday The functin should look at this date, determne that is A WEEKEND date, then provide the next WORKDAY 12/05/2005 Monday. Any suggestions? The Tan Man |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to calculate next WORKDAY?
=IF(WEEKDAY(A2,2)<6,A2,A2+8-WEEKDAY(A2,2))
-- HTH RP (remove nothere from the email address if mailing direct) "The Tan Man" wrote in message oups.com... I need help with an IF statement/function for an Excel spreadsheet. Here is what I am trying to do: If I have a date in a cell and it happens to be Saturday or Sunday, I want the IF statemnt to give the next WORKDAY. For example: 12//3/2005 Saturday The functin should look at this date, determne that is A WEEKEND date, then provide the next WORKDAY 12/05/2005 Monday. Any suggestions? The Tan Man |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to calculate next WORKDAY?
Hello,
If cell A1 contains your original date, then =A1+INDEX({1,1,1,1,3,2,1},WEEKDAY(A1,2)) will give you the next working day. HTH, Bernd |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Last workday | Excel Worksheet Functions | |||
Calculate next workday after adding calendar days to date in cell | Excel Worksheet Functions | |||
Add no. of days to a workday to get new workday? | Excel Worksheet Functions | |||
WORKDAY | Excel Worksheet Functions | |||
How do you calculate workdays if Saturday is a workday? | Excel Worksheet Functions |