How to calculate next WORKDAY?

T

The Tan Man

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
 
J

johnhildreth

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
 
T

Tim

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
 
B

Bob Phillips

=IF(WEEKDAY(A2,2)<6,A2,A2+8-WEEKDAY(A2,2))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
B

Bernd Plumhoff

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top