Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculations with Saturday & Sunday

Status
Not open for further replies.

SamDemon

Technical User
May 28, 2003
171
GB
Cant get this to work! i tell you what i want first... what i have is a date of travel (C3), we need to release all PAX names 6 weeks prior to departure (42 days). This would be easy (R3 = C3-42). The problem occurs in that if the 42 days falls on a Saturday or a Sunday you take the date back to the Friday, i.e. if the day is Saturady you have to minus 1 day, i.e R3 = (C3-42)-1. How should i go about writing this formula.

Thanks

Sam

It's just common sense, shame sense isn't common!
 
=IF(WEEKDAY(c3)=7,c3-43,IF(WEEKDAY(c3)=1,c3-44,c3-42))

is one possibility.
 
Hi SamDemon,

If you have the Analysis Toolpak Add-In installed, you should be able to use ..

[blue][tt]=WORKDAY(C3-41,-1)[/tt][/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top