Problem with NETWORKDAY.INTL Function

masud8956

Board Regular
Joined
Oct 22, 2016
Messages
155
Office Version
2016, 2011, 2007
Platform
Windows
I have used the formula below several times in my worksheet. I am using Excel 2016 so not facing any problem. But some other users are getting errors who are using Excel 2007/2010.
Code:
=IF($K$7="","",IF(NETWORKDAYS.INTL($K$7,$E$8,7,$T$35:$V$67)<1,"-",NETWORKDAYS.INTL($K$7,$E$8,7,$T$35:$V$67)))
When I delete the ".INTL" portion of the formula in Excel 2010, I get the result 1 day more probably because of the default holidays.

Is there any way around to be able to get the same result as NETWORKDAYS.INTL compatible for Excel versions as old as 2007? Weekly holidays are meant to be FRI and SAT for my case.

Thanks
 
Last edited:

Some videos you may like

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.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
8,924
Office Version
2019
Platform
Windows
Array confirmed with Ctrl Shift Enter

=IF($K$7="","",IF(NETWORKDAYS($K$7+1,$E$8+1,$T$35:$V$67+1)<1,"-",NETWORKDAYS($K$7+1,$E$8+1,$T$35:$V$67+1)))

If you have blanks in the holidays range then it will need a slight change.
 

masud8956

Board Regular
Joined
Oct 22, 2016
Messages
155
Office Version
2016, 2011, 2007
Platform
Windows
Yes.

There will be blanks in holiday range.
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
8,924
Office Version
2019
Platform
Windows
Can you modify the layout slightly?

I have just noticed that your holidays are spread over 2 columns, so the change will not work. I'm going to try a couple of other methods, but I think that it would need to be a single column to work.

edit:-

To clarify, it would need to be a single column with no intermediate blanks. i.e. dates at the top, blanks at the bottom.
 
Last edited:

masud8956

Board Regular
Joined
Oct 22, 2016
Messages
155
Office Version
2016, 2011, 2007
Platform
Windows
Absolutely!

I can get them in a single column. You guessed right, Dates at the top and blanks at the bottom.
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
8,924
Office Version
2019
Platform
Windows
Ignore that, I had overlooked the most simple fix

Array confirmed as before.

=IF($K$7="","",IF(NETWORKDAYS($K$7+1,$E$8+1,IF($T$35:$V$67<>"",$T$35:$V$67+1,))<1,"-",NETWORKDAYS($K$7+1,$E$8+1,IF($T$35:$V$67<>"",$T$35:$V$67+1,))))

Or a shorter version, to be used with a custom cell format of #0;-;-;@

=IF($K$7="","",NETWORKDAYS($K$7+1,$E$8+1,IF($T$35:$V$67<>"",$T$35:$V$67+1,)))
 

masud8956

Board Regular
Joined
Oct 22, 2016
Messages
155
Office Version
2016, 2011, 2007
Platform
Windows
Worked beautifully!

Thanks a lot!! :)
 

masud8956

Board Regular
Joined
Oct 22, 2016
Messages
155
Office Version
2016, 2011, 2007
Platform
Windows
Ignore that, I had overlooked the most simple fix

Array confirmed as before.

=IF($K$7="","",IF(NETWORKDAYS($K$7+1,$E$8+1,IF($T$35:$V$67<>"",$T$35:$V$67+1,))<1,"-",NETWORKDAYS($K$7+1,$E$8+1,IF($T$35:$V$67<>"",$T$35:$V$67+1,))))

Or a shorter version, to be used with a custom cell format of #0;-;-;@

=IF($K$7="","",NETWORKDAYS($K$7+1,$E$8+1,IF($T$35:$V$67<>"",$T$35:$V$67+1,)))
Hi again,

Need a little more advice. I have one more formula. It is a WORKDAY function, not NETWORKDAYS. Formula is like:

=WORKDAY.INTL($E$8,$F$19/$B$23,7,$D$16:$D$48)

$E$8 is the start date. $F$19/$B$23 is number of days. Weekly holidays are FRI and SAT. $D$16:$D$48 is the list of public holidays other than weekends.

Since it is not compatible with Excel 2007, as you have guided before, I have tried to fix it like:

=WORKDAY($E$8+1,$F$19/$B$23+1,IF($D$16:$D$48<>"",$D$16:$D$48+1,))

Problem is, the result I am getting is 1/2 days off when I compare with the original (WORKDAY.INTL) formula. Where did I do the mistake?

Thanks!
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
8,924
Office Version
2019
Platform
Windows
Perhaps

=WORKDAY($E$8+1,$F$19/($B$23+1),IF($D$16:$D$48<>"",$D$16:$D$48+1,))

Or

=WORKDAY($E$8+1,($F$19+1)/($B$23+1),IF($D$16:$D$48<>"",$D$16:$D$48+1,))

Without knowing what is expected, or what F19 and B23 refer to, this is just a guess.
 

masud8956

Board Regular
Joined
Oct 22, 2016
Messages
155
Office Version
2016, 2011, 2007
Platform
Windows
My bad! I did not explain well.

F19 refers to total no of tasks left to do. It is a number like 453.0
B23 refers to the existing rate of task/day. Say it is 3.18

Both of these cells are product of other calculations and they are dynamic.

I am trying to predict the completion date by that formula.
 

Watch MrExcel Video

Forum statistics

Threads
1,095,185
Messages
5,442,882
Members
405,206
Latest member
warviksam

This Week's Hot Topics

  • Copy entire row if CountA <>0 to another sheet
    [B]I want to copy entire row if CountA <>0 for column J7:AM7 (headers on J6:AM6) and so on till the last used cell is column D and paste the...
  • Select last used Row in Table
    I have created a Table in a Worksheet which is locked to prevent user errors and protect formula. Some of the cells require freetext entries which...
  • excel workbook: do not allow certain file name
    Hello all, Don't think this has ever been asked before, but how do I restrict file save [Before_Save Event] if the name of the file being saved...
  • fixing problem autofilter
    hello i need help about my code when i search by code in textbox it doesn't show anything this is my data [ATTACH type="full"...
  • “Weight”
    Hi, i’ve got a long sheet filled with weights such as kg,g,L & ml. i can build a formula to convert kg into g and liter into ml. How ever, my...
  • How to capitalize everything before a certain character?
    In column A, I have some text: Hello good day.mp3 Hello good day.flac etc. I'd like to capitalize everything before the period. I don't need the...
Top