View Single Post
  #3 (permalink)  
Old 07-23-2008, 05:29 PM
Rick Rothstein \(MVP - VB\)
 
Posts: n/a
Re: Replacing dates that fall on weekends

If Pete's response does not give you what you need (although I think it
should), then perhaps this will. It takes a date in A1 and either leaves it
alone if it is a weekday date or changes the date to the Friday before if it
is a weekend date...

=A1-(WEEKDAY(A1,2)-5)*(WEEKDAY(A1,2)>5)

Rick


<p.numminen@suomi24.fi> wrote in message
news:bda54e10-f8ff-40bd-a6bc-612bcbe08cb7@f36g2000hsa.googlegroups.com...
> In Microsoft Excel 2003, how can I automatically determine Saturdays
> and Sundays in every cell that has a date in it in a selection range?
> Is there a way to change Saturdays and Sundays to the preceding
> Friday?
>
> How about if I would like to define some specific dates besides
> weekends that should be replaced by the nearest preceding acceptable
> date?


Reply With Quote