Exclude certain dates fron holidays in the NETWORKDAYS function

Rainmanne

New Member
Joined
Mar 10, 2016
Messages
42
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?
 

tyija1995

Well-known Member
Joined
Feb 26, 2019
Messages
648
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?
 

Rainmanne

New Member
Joined
Mar 10, 2016
Messages
42
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.
 

Forum statistics

Threads
1,082,243
Messages
5,363,972
Members
400,772
Latest member
solbebe

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top