Dr
Fri Mar 14 12:09:06 CDT 2008
In microsoft.public.scripting.vbscript message <bb1cabb8-1f57-4114-b95d-
e4e340a044a4@v3g2000hsc.googlegroups.com>, Thu, 13 Mar 2008 02:07:32,
tia.abdelkarim@gmail.com posted:
>Hey,
>I am doing an exel sheet concerning the annual leave and i am trying
>to figure out a formula that
>gives the total vacation days excluding Saturday and sunday
>
>I have tried this formula but its not working so what can i do ?
>
>IF (TotalDays Mod 7) * 7 = 6 Then WeekEndDays = WeekEndDays + 1
Consider leave from the 1st to the 4th of a month, this year. If it was
February, two working days would have been missed; if April, four
working days missed. That is, assuming the weekend is Sat & Sun; if you
are dealing with a Muslim country, you may need different months.
Clearly, therefore, the total of days spanned does not provide
sufficient information.
Determine the number of days missed in the first week and, if different,
the last week, and to that add five times the number of complete weeks
missed.
--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05.
Web <URL:
http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:
http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.