#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Working days

I would appreciate any help that anyone can give with this problem.

I have a column of dates and next to it I want to create a formula which
adds 30 calendar days and if the result is a weekend or national holiday
then the result I want is the next good working day.

Help please!


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Working days

Use: =IF(OR(WEEKDAY(TODAY()+30)=1,WEEKDAY(TODAY()+30)=7 ),TODAY()+31,TODAY()+30)

Where a WEEKDAY value of 1 = SUNDAY and a WEEKDAY value of 7 = Saturday.

As for national holiday--that's dependent on the country you live in.
Perhaps look at the NETWORKDAYS function if that's really a requirement.

Dave
--
Brevity is the soul of wit.


"Andrew Mackenzie" wrote:

I would appreciate any help that anyone can give with this problem.

I have a column of dates and next to it I want to create a formula which
adds 30 calendar days and if the result is a weekend or national holiday
then the result I want is the next good working day.

Help please!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Working days

On Wed, 3 Jan 2007 11:24:58 -0000, "Andrew Mackenzie"
wrote:

I would appreciate any help that anyone can give with this problem.

I have a column of dates and next to it I want to create a formula which
adds 30 calendar days and if the result is a weekend or national holiday
then the result I want is the next good working day.

Help please!



=WORKDAY(A1+29,1,holidays)

Holidays is a named range with a list of your holidays.

If the WORKDAY function is not available, and returns the #NAME? error, install
and load the Analysis ToolPak add-in.

On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then click
OK.
If necessary, follow the instructions in the setup program.

--ron
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Working days

Thanks very much Dave and Ron.

Ron, yours seems a prettier solution and it seems to have worked with a
brief test. However, I am curious to know why we add 29 rather than 30 to
my start date. Can you enlighten me?

Thanks,
Andrew.
"Andrew Mackenzie" wrote in message
...
I would appreciate any help that anyone can give with this problem.

I have a column of dates and next to it I want to create a formula which
adds 30 calendar days and if the result is a weekend or national holiday
then the result I want is the next good working day.

Help please!




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 422
Default Working days

With A1:A4 holding:

11/27/2006
11/28/2006
11/29/2006
11/30/2006

When I enter in B1 and Copy down

=WORKDAY(A1+29,1,Holidays)

I get in B1:B4:

12/27/2006
12/28/2006
12/29/2006
01/01/2007 <<< Not sure why this one?? Any ideas what's going wrong?

My Holiday range only includes 10/31/2006 and 12/25/2006 (2 cells)

Thanks,





"Ron Rosenfeld" wrote in message
:

On Wed, 3 Jan 2007 11:24:58 -0000, "Andrew Mackenzie"
wrote:

I would appreciate any help that anyone can give with this problem.

I have a column of dates and next to it I want to create a formula which
adds 30 calendar days and if the result is a weekend or national holiday
then the result I want is the next good working day.

Help please!



=WORKDAY(A1+29,1,holidays)

Holidays is a named range with a list of your holidays.

If the WORKDAY function is not available, and returns the #NAME? error, install
and load the Analysis ToolPak add-in.

On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then click
OK.
If necessary, follow the instructions in the setup program.

--ron




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 422
Default Working days

Never mind; additional testing is revealing an original
misunderstanding;;;
Thanks,


"JMay" wrote in message
:

With A1:A4 holding:

11/27/2006
11/28/2006
11/29/2006
11/30/2006

When I enter in B1 and Copy down

=WORKDAY(A1+29,1,Holidays)

I get in B1:B4:

12/27/2006
12/28/2006
12/29/2006
01/01/2007 <<< Not sure why this one?? Any ideas what's going wrong?

My Holiday range only includes 10/31/2006 and 12/25/2006 (2 cells)

Thanks,





"Ron Rosenfeld" wrote in message
:

On Wed, 3 Jan 2007 11:24:58 -0000, "Andrew Mackenzie"
wrote:

I would appreciate any help that anyone can give with this problem.

I have a column of dates and next to it I want to create a formula which
adds 30 calendar days and if the result is a weekend or national holiday
then the result I want is the next good working day.

Help please!



=WORKDAY(A1+29,1,holidays)

Holidays is a named range with a list of your holidays.

If the WORKDAY function is not available, and returns the #NAME? error, install
and load the Analysis ToolPak add-in.

On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then click
OK.
If necessary, follow the instructions in the setup program.

--ron


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Working days

Andrew--not only is Ron's suggestion prettier, it also is easier to audit in
the future. Definitely go with it instead of my response.

Dave
--
Brevity is the soul of wit.


"Andrew Mackenzie" wrote:

Thanks very much Dave and Ron.

Ron, yours seems a prettier solution and it seems to have worked with a
brief test. However, I am curious to know why we add 29 rather than 30 to
my start date. Can you enlighten me?

Thanks,
Andrew.
"Andrew Mackenzie" wrote in message
...
I would appreciate any help that anyone can give with this problem.

I have a column of dates and next to it I want to create a formula which
adds 30 calendar days and if the result is a weekend or national holiday
then the result I want is the next good working day.

Help please!





  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Working days

On Wed, 3 Jan 2007 12:42:03 +0000, "JMay" wrote:

With A1:A4 holding:

11/27/2006
11/28/2006
11/29/2006
11/30/2006

When I enter in B1 and Copy down

=WORKDAY(A1+29,1,Holidays)

I get in B1:B4:

12/27/2006
12/28/2006
12/29/2006
01/01/2007 <<< Not sure why this one?? Any ideas what's going wrong?

My Holiday range only includes 10/31/2006 and 12/25/2006 (2 cells)

Thanks,



If you don't have 1 Jan listed in your Holiday range, and it is not a weekend
day (Saturday Sunday), Excel cannot know that you want to consider it a
holiday.

1 Jan 2007 was a Monday.

--ron
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Working days

On Wed, 3 Jan 2007 12:03:07 -0000, "Andrew Mackenzie"
wrote:

Thanks very much Dave and Ron.

Ron, yours seems a prettier solution and it seems to have worked with a
brief test. However, I am curious to know why we add 29 rather than 30 to
my start date. Can you enlighten me


The extra "1" day is added by the WORKDAY function.

If you first add 29 days, ignoring weekends and holidays, to your initial date
and then add "1" Workday, the WORKDAY function will skip over that next date if
it is a weekend or listed in your list of Holidays.

That was how I understood your requirements.


--ron
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
Adding Working Days to a Formula jpw1972 Excel Discussion (Misc queries) 1 April 4th 06 09:46 AM
How do you add 40 working days to a date EmmaLaw22 Excel Discussion (Misc queries) 3 April 3rd 06 02:29 PM
Working days left in the month compared to previous months qwopzxnm Excel Worksheet Functions 8 October 24th 05 08:00 PM
calculate number of working days philc Excel Worksheet Functions 2 June 1st 05 07:48 AM
Working time and days Nortos Excel Worksheet Functions 5 May 6th 05 04:17 PM


All times are GMT +1. The time now is 10:34 PM.

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"