#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Calculate Date

Can an add function be tweaked to compute a date value that does not equal a
Saturday or Sunday.

Example:
Start date = 4/17, days added = 2, answer = 4/19 which is a Sunday.
Desired answer is 4/20 which is a Monday.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Calculate Date

Try this:

A1 = 4/17/2009
B1 = 2

If the result you expect is Monday then that means you're counting the start
date.

=WORKDAY(A1-1,B1)

Format as Date

The WORKDAY function requires the Analysis ToolPak add-in be installed in
Excel versions prior to Excel 2007.

--
Biff
Microsoft Excel MVP


"brownmre" wrote in message
...
Can an add function be tweaked to compute a date value that does not equal
a
Saturday or Sunday.

Example:
Start date = 4/17, days added = 2, answer = 4/19 which is a Sunday.
Desired answer is 4/20 which is a Monday.




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 793
Default Calculate Date

Try
=A1+2+IF(WEEKDAY(A1+2,2)5,8-WEEKDAY(A1+2,2),0)
with Start date in A1

"brownmre" wrote:

Can an add function be tweaked to compute a date value that does not equal a
Saturday or Sunday.

Example:
Start date = 4/17, days added = 2, answer = 4/19 which is a Sunday.
Desired answer is 4/20 which is a Monday.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Calculate Date

Look in Excel help at the function WORKDAY
--
David Biddulph

"brownmre" wrote in message
...
Can an add function be tweaked to compute a date value that does not equal
a
Saturday or Sunday.

Example:
Start date = 4/17, days added = 2, answer = 4/19 which is a Sunday.
Desired answer is 4/20 which is a Monday.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Calculate Date

Thanks Sheeloo. It works great.

"Sheeloo" wrote:

Try
=A1+2+IF(WEEKDAY(A1+2,2)5,8-WEEKDAY(A1+2,2),0)
with Start date in A1

"brownmre" wrote:

Can an add function be tweaked to compute a date value that does not equal a
Saturday or Sunday.

Example:
Start date = 4/17, days added = 2, answer = 4/19 which is a Sunday.
Desired answer is 4/20 which is a Monday.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 793
Default Calculate Date

You are welcome.

Try Biff's solution too... it is more elegant.

=WORKDAY(A1-1,2)
or

=WORKDAY(A1,2)

"brownmre" wrote:

Thanks Sheeloo. It works great.

"Sheeloo" wrote:

Try
=A1+2+IF(WEEKDAY(A1+2,2)5,8-WEEKDAY(A1+2,2),0)
with Start date in A1

"brownmre" wrote:

Can an add function be tweaked to compute a date value that does not equal a
Saturday or Sunday.

Example:
Start date = 4/17, days added = 2, answer = 4/19 which is a Sunday.
Desired answer is 4/20 which is a Monday.


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Calculate Date

It depends on what their exact requirements are.

Our formulas return different results depending on the weekday of the date.

--
Biff
Microsoft Excel MVP


"Sheeloo" wrote in message
...
You are welcome.

Try Biff's solution too... it is more elegant.

=WORKDAY(A1-1,2)
or

=WORKDAY(A1,2)

"brownmre" wrote:

Thanks Sheeloo. It works great.

"Sheeloo" wrote:

Try
=A1+2+IF(WEEKDAY(A1+2,2)5,8-WEEKDAY(A1+2,2),0)
with Start date in A1

"brownmre" wrote:

Can an add function be tweaked to compute a date value that does not
equal a
Saturday or Sunday.

Example:
Start date = 4/17, days added = 2, answer = 4/19 which is a Sunday.
Desired answer is 4/20 which is a Monday.




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
Trying to calculate end date using order date and lead time variab BWA Excel Worksheet Functions 3 August 15th 08 04:48 PM
Auto calculate for date + days forward to yield new date John Sullivan Excel Worksheet Functions 1 April 22nd 06 05:18 PM
formula to calculate age using birth date and current date lalah Excel Worksheet Functions 2 November 20th 05 10:51 PM
formula to calculate future date from date in cell plus days Chicesq Excel Worksheet Functions 8 November 3rd 05 12:25 PM
Calculate month-end date from date in adjacent cell? Matt D Francis Excel Worksheet Functions 4 May 19th 05 04:55 AM


All times are GMT +1. The time now is 07:18 PM.

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

About Us

"It's about Microsoft Excel"