workday with exceptions

Ting_92

New Member
Joined
Apr 29, 2019
Messages
5
Hi all,

Thank you for spending your time to read the post.

I have some questions regarding the excel.

I am in the process of creating an excel workday calculator. The issue is
1. There are some working saturdays
2. There are some non-working holidays (which i grouped under public holidays)

I have found the excel formula to exclude public holiday, but i cannot find back the formula to include.

Here is the function i have currently :
=WORKDAY.INTL(WORKDAY(N2,-2,Sheet5!$E$1:$E$26),-4,11,Sheet5!$E$1:$E$26)
Reason for seperated double function is as some days are inclusive of saturday calc. and some doesnt.

I duno how to include the working saturdays in the formula :(
Can anyone help?

Ultimately, I hope someone can help me with a public function creation of an excel vba so that it can be easily used. The dates for public holiday and inclusion hopes to be included inside the VBA.

Holidays (PH + non working days)

[TABLE="width: 76"]
<colgroup><col></colgroup><tbody>[TR]
[TD="align: right"]1/1/2019[/TD]
[/TR]
[TR]
[TD="align: right"]5/2/2019[/TD]
[/TR]
[TR]
[TD="align: right"]7/3/2019[/TD]
[/TR]
[TR]
[TD="align: right"]3/4/2019[/TD]
[/TR]
[TR]
[TD="align: right"]19/4/2019[/TD]
[/TR]
[TR]
[TD="align: right"]1/5/2019[/TD]
[/TR]
[TR]
[TD="align: right"]19/5/2019[/TD]
[/TR]
[TR]
[TD="align: right"]30/5/2019[/TD]
[/TR]
[TR]
[TD="align: right"]1/6/2019[/TD]
[/TR]
[TR]
[TD="align: right"]5/6/2019[/TD]
[/TR]
[TR]
[TD="align: right"]6/6/2019[/TD]
[/TR]
[TR]
[TD="align: right"]11/8/2019[/TD]
[/TR]
[TR]
[TD="align: right"]1/6/2019
[/TD]
[/TR]
</tbody>[/TABLE]

Working saturdays :
[TABLE="width: 33"]
<colgroup><col></colgroup><tbody>[TR]
[TD]03.06.2019[/TD]
[/TR]
[TR]
[TD]04.06.2019[/TD]
[/TR]
[TR]
[TD]31.12.2019[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Have Saturdays as a normal working day then have the non working saturdays as holidays.
 
Upvote 0
See id the following formula works for you:

=WORKDAY.INTL(N2,O2,"00000"&IF(COUNTIF(Exceptions,WORKDAY.INTL(N2,O2,"0000000",Holidays)),"00","11"),Holidays)

Here N2 is the cell with the start date;
O2 is the cell with the number of workdays to count;
Holidays is a named range with holiday dates;
Exceptions is a named range with working Saturdays and/or Sundays.
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top