![]() |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 08:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com