Avoid date falling on weekend

  • Thread starter Thread starter Frank Kabel
  • Start date Start date
F

Frank Kabel

Hi
try
=WORKDAY(A1,-30)
Note: The analysis Toolpak has to be installed for this

-----Original Message-----
I am looking to schedule an event 30 calender days prior
to a due date and I want to avoid the date falling on a
weekend. If =A3-30 falls on a Saturday or Sunday, I want
the date to be pushed back to Friday. I would use WEEKDAY,
but I don't want the interval to be calculated based on
business days.
 
Frank

That was my first thought, but the OP stated that they 'don't want the
interval to be calculated based on business days'. I think mine manages
that, but I'm sure you'll come up with something much sweeter!! ;-)
 
Hi andy
yes you're probably right!. A different approach to your formula could
be
=A1-30-MAX(WEEKDAY(A1-30,1)-5,0)
 
This is a bit shorter

=(A1-30)-1*(WEEKDAY(A1-30)=7)-2*(WEEKDAY(A1-30)=1)

--

Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top