Exclude certain dates fron holidays in the NETWORKDAYS function

Rainmanne

Board Regular
Joined
Mar 10, 2016
Messages
132
Office Version
  1. 2013
Platform
  1. Windows
I've set up a worksheet to calculate holidays. There is a table consisting two columns. On column with dates, which include and days-off (holiday, public holidays and business trips) and another column with types of holiday ("holiday", "Public Holiday" and "business trip"). I use this table for several calculations.

There is another table, which has three columns: start date, end date and number of days, where I calculate holidays. I use a NETWORKDAYS function to exclude public holidays and weekends from calculations if they happen during my holiday. I tried to use the previous table of all days-off for the [holidays] field. But in order to distinguish between holidays and public holidays I tried to use INDEX/MATCH functions to exclude only "public holidays":
Code:
=NETWORKDAYS(J14,K14,INDEX($A$2:$A$97,MATCH("Public Holiday",$C$2:$C$97,0)))

However, it does not seem to work. Basically I need the NETWORKDAYS function to take into account only "public holidays". I guess it should be something to do with array. Is it possible to do?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
So you essentially don't want any weekend parameter right?

You can use binary to eliminate weekends from NETWORKDAYS.INTL function

I.e.
=NETWORKDAYS.INTL(TODAY(),TODAY()+9,"0000000")
will return 10 --> you can use the last parameter of the function to include your public holidays - is this what you're after?
 
Upvote 0
Maybe...

=NETWORKDAYS(J14,K14,INDEX(($C$2:$C$97="Public Holiday")*$A$2:$A$97,))

M.
 
Upvote 0
Solution
So you essentially don't want any weekend parameter right?

You can use binary to eliminate weekends from NETWORKDAYS.INTL function

I.e.
=NETWORKDAYS.INTL(TODAY(),TODAY()+9,"0000000")
will return 10 --> you can use the last parameter of the function to include your public holidays - is this what you're after?

No, I want to exclude holidays (like my holidays allowance) and leave only weekends and public holidays.
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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