Help with networkday formula

ExcelFanatic

Board Regular
Joined
May 22, 2009
Messages
83
Need some assistance. I have a spreadsheet that track available hours in a month using the NETWORK day function. My worksheet is setup as follows:

HEADER ROW
Column C: Hire Date
Column D: Termination Date
Columns E through DW: 10/1/2007 through 12/1/2017 (each column header is the first day of the month

In cell E2, I have the following formula that tells me the number of hours available for each month from either the Hire Date (cell C2), or the Month Start Date (cell E1)

IF($C2 > EOMONTH(E$1,0),"",NETWORKDAYS.INTL(IF($C2 < E$1,E$1,$C2),EOMONTH(E$1,0))*8)

The formula works correctly at the front end, but I need to add to the formula to account for the Termination Date in the month column that corresponds to the Termination Date (D2). If there is a Termination Date it needs to use that date for the hours in the final month, but if the Termination Date is blank, then keep using the formula above.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Is this what you mean?

Formula in E2 is copied across and down.

Excel Workbook
CDEFGHIJKLMNO
1HireTermination01-Oct-0701-Nov-0701-Dec-0701-Jan-0801-Feb-0801-Mar-0801-Apr-0801-May-0801-Jun-0801-Jul-0801-Aug-08
215-Dec-0727-Mar-08 88184168152
316-Apr-0820-Apr-0824
431-Oct-0703-Dec-0781768
531-Dec-078184168168176176168184168
Hours
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,411
Messages
6,119,360
Members
448,888
Latest member
Arle8907

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