View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Date and Day Programming

=A1+30-CHOOSE(WEEKDAY(A1),6,0,1,2,3,4,5)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Gee-off" wrote in message
...
In my spreadsheet, I have some inspection dates of some materials that I
have. I have to inspect these items on a "julian date" (30-day) interval.
For example:

A1 -- inspected date is 1 February 2006 (which is a Wednesday)
B1 -- Next inspection due date is 30 days from inspected date (may or may
not be
a Wedensday)

I have to inspect this item every 30 days, so I used the formula:

(In cell B1) "=A1+30"

This gave me 30 days after the inspected date, but I want the inspection

to
show due on the Wednesday before the 30-day becomes due. Is there a way

to
tell Excel to defer to the Wednesday immediately before the 30-day

inpsection
is due?