Lisa Hetherington wrote:
Not exactly,
If my formula returns a date that falls on a Sat or Sun, I would like it to advance to the Mon after the weekend (when I would be at work).

It comes in handy here to take advantage of the fact that TRUE and FALSE have the numeric values 1 and 0.

So we can move weekend dates to the following Monday using

= d + (wd=1) + 2*(wd=7)

where d is the date and wd is WEEKDAY(d)

If A1 is your date (d), and B1 is WEEKDAY(A1), then the formula will be:

= A1 + (B1=1) + 2*(B1=7)

If you can't spare the extra cell (B1), then use

= A1 + (WEEKDAY(A1)=1) + 2*(WEEKDAY(A1)=7)


So, when d falls on Sat (wd is 7), the formula evaluates to

= d + 0 + 2*1

or 2 days later, and when d falls on Sun (wd is 1),

= d + 1 + 2*0

or 1 day later.

For any other day: = d + 0 + 2*0
the same day.

<Joe

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to