count public holiday weekdays in date range

ajm

Well-known Member
Joined
Feb 5, 2003
Messages
2,007
Office Version
  1. 365
Platform
  1. Windows
i need to count the number or weekday public holidays that fall between certain dates. In this instance, i am looking for the weekday public holidays that fall in Ramadan.
This year, Ramadan is 22/3/2023 - 21/04/2023. Easter public holidays are also within that date range. The public holiday dates are in the range "PubHols". Now I know its two, but i would like a formula to do the calculation for this model i am building. Can anyone assist?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
@ajm , you can use the NETWORKDAYS.INTL function.

Mr excel questions 41.xlsm
ABCDEF
1
2StartEndWeekend:PubHols
32023-05-012023-07-31Sat, SunThu 2023-06-15
4Thu 2023-07-20
5NETWORKDAYS.INTL:
664
sjm
Cell Formulas
RangeFormula
A6A6=NETWORKDAYS.INTL(A3,B3,1,$F$3:$F$5)
 
Upvote 0
or if you wanted to use the rangename for the public holidays:


Excel Formula:
=NETWORKDAYS.INTL(A3,B3,1,PubHols)
 
Upvote 0
See if the following formula works for you:
Excel Formula:
=NETWORKDAYS(A3,B3)-NETWORKDAYS(A3,B3,PubHols)
 
Upvote 0
Solution
See if the following formula works for you:
Excel Formula:
=NETWORKDAYS(A3,B3)-NETWORKDAYS(A3,B3,PubHols)
ah, I read the Original post incorrectly. This is a good answer.
 
Upvote 0

Forum statistics

Threads
1,215,088
Messages
6,123,057
Members
449,091
Latest member
ikke

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