ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   calculating weekday date (https://www.excelbanter.com/new-users-excel/190777-calculating-weekday-date.html)

Khardy3352

calculating weekday date
 
I need to calculate a date 10 days from a start date that, if the final date
is a Sat, the result defaults to the previous Fri, or, if the final date is a
Sun, the result defaults to a Mon. Is this possible? I use 2003. Thanks for
your help. In your response, remember I am a novice and need a little extra
explanation. :)

Ron Rosenfeld

calculating weekday date
 
On Tue, 10 Jun 2008 19:23:01 -0700, Khardy3352
wrote:

I need to calculate a date 10 days from a start date that, if the final date
is a Sat, the result defaults to the previous Fri, or, if the final date is a
Sun, the result defaults to a Mon. Is this possible? I use 2003. Thanks for
your help. In your response, remember I am a novice and need a little extra
explanation. :)



With your original date in A1:

=A1+10+(WEEKDAY(A1+10)=1)-(WEEKDAY(A1+10)=7)

or, a bit more obscure, but shorter:

=A1+10+(WEEKDAY(A1)=5)-(WEEKDAY(A1)=4)

--ron

Khardy3352

calculating weekday date
 

Excellent! Thank you!!!
"Ron Rosenfeld" wrote:

On Tue, 10 Jun 2008 19:23:01 -0700, Khardy3352
wrote:

I need to calculate a date 10 days from a start date that, if the final date
is a Sat, the result defaults to the previous Fri, or, if the final date is a
Sun, the result defaults to a Mon. Is this possible? I use 2003. Thanks for
your help. In your response, remember I am a novice and need a little extra
explanation. :)



With your original date in A1:

=A1+10+(WEEKDAY(A1+10)=1)-(WEEKDAY(A1+10)=7)

or, a bit more obscure, but shorter:

=A1+10+(WEEKDAY(A1)=5)-(WEEKDAY(A1)=4)

--ron


Ron Rosenfeld

calculating weekday date
 
On Tue, 10 Jun 2008 20:36:00 -0700, Khardy3352
wrote:

Excellent! Thank you!!!
"Ron Rosenfeld" wrote:


You're welcome. Glad to help. Thanks for the feedback.
--ron


All times are GMT +1. The time now is 10:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com