A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculate Date



 
 
Thread Tools Display Modes
  #1  
Old April 15th, 2009, 06:14 PM posted to microsoft.public.excel.worksheet.functions
brownmre
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  
Old April 15th, 2009, 06:26 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
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  
Old April 15th, 2009, 06:32 PM posted to microsoft.public.excel.worksheet.functions
Sheeloo
external usenet poster
 
Posts: 797
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  
Old April 15th, 2009, 06:35 PM posted to microsoft.public.excel.worksheet.functions
David Biddulph
external usenet poster
 
Posts: 8,714
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  
Old April 15th, 2009, 07:26 PM posted to microsoft.public.excel.worksheet.functions
brownmre
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  
Old April 15th, 2009, 08:25 PM posted to microsoft.public.excel.worksheet.functions
Sheeloo
external usenet poster
 
Posts: 797
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  
Old April 15th, 2009, 09:05 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
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.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:49 AM.


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