Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Exclude weekends when counting days only on day 29 or 30

I have a formula that returns a date 30 calendar days from a given date.
Example, cell A1 has 02/14/08. I want to add 30 days to this date and find
out what date that is but if that date is a Saturday or a Sunday, I want the
previous business day which is a Friday. I want to count all Saturdays and
Sundays during the 30 day cycle EXECPT if the 30th day is a Saturday or a
Sunday, I need to have a date returned that will back it up to the last
business day.

In other words, if today were February 15th and I had 30 calendar days to
complete my task, that would be March 16th, but since March 16th is a Sunday,
I need the formula to return the last business day (March 14th) on or before
day # 30.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Exclude weekends when counting days only on day 29 or 30

On Tue, 19 Feb 2008 10:51:01 -0800, Loren A - Huntley, Illinois <Loren A -
Huntley, wrote:

I have a formula that returns a date 30 calendar days from a given date.
Example, cell A1 has 02/14/08. I want to add 30 days to this date and find
out what date that is but if that date is a Saturday or a Sunday, I want the
previous business day which is a Friday. I want to count all Saturdays and
Sundays during the 30 day cycle EXECPT if the 30th day is a Saturday or a
Sunday, I need to have a date returned that will back it up to the last
business day.

In other words, if today were February 15th and I had 30 calendar days to
complete my task, that would be March 16th, but since March 16th is a Sunday,
I need the formula to return the last business day (March 14th) on or before
day # 30.



With the Analysis Tool Pak installed:

=WORKDAY(A1+31,-1)

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

How?

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.
Syntax




See HELP for this: Note that holidays is an optional argument, so if A1+30
should fall on a holiday, or if Friday happened to be a holiday, you would
still return the business day prior to A1+30
--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
Conditional Formatting to Exclude Weekends 2manypuppies Excel Worksheet Functions 4 May 29th 07 07:59 PM
How do I set up a calculation to exclude weekends? Ken Proj mgr Excel Worksheet Functions 6 February 8th 06 02:49 PM
Date Calculation to exclude weekends Vim Excel Worksheet Functions 2 January 24th 06 02:58 PM
calculation to exclude weekends Need2Know Excel Worksheet Functions 6 July 14th 05 09:01 PM
Schedule to exclude weekends and holidays Erin D. Excel Discussion (Misc queries) 3 March 15th 05 09:49 PM


All times are GMT +1. The time now is 02:17 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"