Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Last workday Mortir Excel Worksheet Functions 2 June 15th 11 05:23 PM
Calculate next workday after adding calendar days to date in cell Darrell[_2_] Excel Worksheet Functions 13 May 7th 10 12:04 AM
Add no. of days to a workday to get new workday? blswes Excel Worksheet Functions 1 April 15th 10 07:39 PM
WORKDAY Daniel Q. Excel Worksheet Functions 6 August 13th 08 03:20 PM
How do you calculate workdays if Saturday is a workday? Tracy Parish Excel Worksheet Functions 3 April 18th 08 12:18 PM


All times are GMT +1. The time now is 03:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"