SAT and Sun

S

StandardPrince

I want to create an formula - where i type in a future date say July
5th 2005.
THEN to the right it will show me 21 days before 14 days before a week
before and 4 days before BUT what i want to do is if that date is on a
WEEKEND, then to go to the next earlist weekday. so say 4 days before
is a Sunday or Sat- than i want it to show me the Friday. HELPPPPPPPP!
 
J

Jerry W. Lewis

Assuming that your typed in future date is an Excel date, and that it is
in cell A1,
=IF(WEEKDAY(A1-4,2)>5,A1-4-WEEKDAY(A1-4,2)+5,A1-4)
for 4 days before. Change each A1-4 to A1-21 for 21 days before ...

Jerry
 

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

Top