HI,
Canany body help me to change weekend in networkdays from saturday, sunday to friday and saturday
and also if i want only one weekend i.e. friday
Regards,
Kamal
HI,
Canany body help me to change weekend in networkdays from saturday, sunday to friday and saturday
and also if i want only one weekend i.e. friday
Regards,
Kamal
If the weekend is still 2 consecutive days it's relatively easy to modify NETWORKDAYS, e.g. for Fri/Sat
=NETWORKDAYS(A2+1,B2+1)
or to handle a holiday range in H2:H10
=NETWORKDAYS(A2+1,B2+1,INDEX(H$2:H$10+1,0))
for Thu/Fri change the +1s to +2s, for Wed/Thu use +3 etc....
For single weekend day you can use a formula like this
=B2-A2+1-INT((WEEKDAY(A2-6)+B2-A2)/7)
That excludes just Friday - change the 6 for other single days (1 = Sun to 7 = Sat)
If you need to exclude holidays from the latter version then it needs a further tweak......
Audere est facere
Thanks a lot it works for me perfectly.
Regards,
Kamal![]()
I still couldn't figure out how to change it in a template sheet I use for employees vacations.
so, please advise how can I attach the file to check and give help.
Thanks in advance.
Administrative Note:
Welcome to the forum.
We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.
Please see Forum Rule #4 about hijacking and start a new thread for your query.
If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks