View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Integrating Networkdays() Into Formula

Hello,

I'm trying to integrate the Networkdays() function into my code so that
weekends are taken into account within the calculations. So far I have had
zero luck in determining how to do this. Below is the code.


=IF(A2<"",IF(H2=9,IF(G2<=$AO$2-Defs!D$3-1,1,0),IF(H2=5,IF(G2<=$AO$2-Defs!D$4-1,1,0),IF(H2=8,IF(G2<=$AO$2-Defs!D$8-1,1,0)))),"")


To Explain the Cells that are used....
A2 - Axxx Contains text - the qty increases or decreases weekly
H2 - Hxxx are simple numeric values to determine the category/type of line
item so as to know the appropriate span of days allowed
G2 - Gxxx Contains Dates that varies and may not be the same date from one
to another
AO2 - Holds the current date to be used for determining the end of the span
for all dates in Column G
Defs!D3 - Defs!Dxxx contains the length of date spans allowed for each
category/type


If a line item has exceeded it's allotted span then a number one in used to
indicate so. If it is not past it's allotted span then a zero shows that
there is still time left to be used. this worked great for months UNTIL I
found out that I needed to Exclude Saturday & Sunday from the count of days
to be used.

Can anyone help me integrate the networkdays function so that it works as
needed?

Thanks in Advance!
Rob