Formula to calculate Network Days not working properly

JayB0730

Board Regular
Joined
Oct 22, 2014
Messages
74
Office Version
  1. 365
Platform
  1. Windows
Hello,

I've been using the following formula for months now without problem (or so I thought) & it worked in the month of August (which had Five Fridays in the month), but for some reason it is not calculating properly for September.

Formula:
Code:
=IF($I$8="Y",0,IF(E2="N",($D2/(INT((DAY(DATE(YEAR($I$5),MONTH($I$5)+1,1)-WEEKDAY(DATE(YEAR($I$5),MONTH($I$5)+1,2)))+6)/7)))*NETWORKDAYS.INTL(DATE(YEAR(TODAY()),MONTH(TODAY()),1),TODAY()+1,"1111101"),$D2))

I5=9/7/2018
I8="N"
E2="N"
D2=$114.88

The cell should result in displaying, as of today, $57.44. The reason is that every Friday the system should calculate how much money to set aside until it reaches the last Friday in the month, which will show the same amount in D2. August had 5 Fridays so the deduction was less for each Friday. Other months worked fine that contained 4 and 5 Fridays. Not sure why September is not working correctly. Currently displays $86.16.

TIA,
Jay
 
Last edited:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
That's the problem I'm facing, I can switch the formula "1111101" around to make it work this time but if I go back it would have messed up previously, which obviously means that it will result in an incorrect answer moving forward. I think the problem has to do with the number of days in the month, calculating the next Friday. I just can't figure out how to make this work.
 
Upvote 0
Your formula is calculating the number of Saturdays. I thought you wanted to calculate the number of Fridays!
 
Upvote 0

Excel 2010
BCDE
114-Sep-1814-Sep-18
2$114.88N
357.44
8b
Cell Formulas
RangeFormula
B3=D2/NETWORKDAYS.INTL(B1-DAY(B1)+1,EOMONTH(B1,0),"1111011")*NETWORKDAYS.INTL(B1-DAY(B1)+1,E1,"1111011")
 
Last edited:
Upvote 0
Excel 2010
BCDE
114-Sep-1814-Sep-18
2$114.88 N
357.44

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
8b

Worksheet Formulas
CellFormula
B3=D2/NETWORKDAYS.INTL(B1-DAY(B1)+1,EOMONTH(B1,0),"1111011")*NETWORKDAYS.INTL(B1-DAY(B1)+1,E1,"1111011")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

I really appreciate the help. My needs are more dynamic but you got the smoke burning upstairs :) Here is the revised formula that works perfectly now and is more concise:

Code:
IF($I$8="Y",0,IF(E2="N",($D2/NETWORKDAYS.INTL(EOMONTH($I$5,-1)+1,EOMONTH($I$5,0),"1111011")*NETWORKDAYS.INTL(EOMONTH($I$5,-1)+1,TODAY(),"1111011")),$D2))

D2 = Total Amount allocated for month
E2 = Reset Flag
I5 = Any date within current month
 
Upvote 0

Forum statistics

Threads
1,213,562
Messages
6,114,326
Members
448,564
Latest member
ED38

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