View Single Post
  #7   Report Post  
Bruce
 
Posts: n/a
Default

Thanks, Ron, for your reply.

No, the base date from which I begin the calculations will never be anything
but a weekday.

Bruce

"Ron Rosenfeld" wrote:

On Wed, 18 May 2005 13:25:02 -0700, "Bruce"
wrote:

Hope I can explain this clearly. If this, or something like it, has been
answered before, please direct me to the post.

I have a worksheet in which I need to calculate the future date, one month
from the date in another cell, less one day. (ex. 5/18/2005 to 6/17/2005). If
the calculated day is a weekend (Saturday or Sunday) I need to return the
immediately previous Friday. So, if I am calculating the date based on an
original entry of 5/20/2005, the date may come back as 6/19/2005, a Sunday,
so I would instead need to get to 6/17/2005.

Presently I see that this would probably entail a LOT of nested functions to
cover February and the move from December to January, etc. Just wondering if
there's a simpler way to approach this (aside from just manually entering the
dates after visually determining the correct date).

Thanks in advance!


The problem, as you have realized, is that "month" does not have a definite
number of days. So you have to define what you want to happen when the
subsequent month has fewer days than the base month.

Also, is it possible for the base date to occur on a weekend?

For example:

Monday 31 Jan 2005 -- ??



--ron