PDA

View Full Version : Solved: working with Dates



chungtinhlak
02-25-2009, 10:27 AM
is there a formula to subtract dates but exclude weekends.

Example, cell Q1, i have =Today()
I want Cell P1 to be QA1 - 1 and the formula remains constain all the way to A1. But the problem is I have weekends in there. Is there a way to skip the weekend?

attached is example.

Bob Phillips
02-25-2009, 10:39 AM
=IF(WEEKDAY(Q1)=2,Q1-3,Q1-1)

chungtinhlak
02-25-2009, 11:29 AM
wow you make everything looks easy xld. thanks

Sagy
02-26-2009, 09:52 AM
=IF(WEEKDAY(Q1)=2,Q1-3,Q1-1)
Just keep in mind that this will not work if the date in Q1 is a Sunday (WEEKDAY(Q1)=1). Since it looks like this can't occur in your case, this is not an issue for you.