ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to calculate next WORKDAY? (https://www.excelbanter.com/excel-programming/338950-how-calculate-next-workday.html)

The Tan Man

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


[email protected]

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


Tim[_39_]

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




Bob Phillips[_6_]

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




Bernd Plumhoff[_4_]

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