View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sum Limit and marking Sum Limit and marking is offline
external usenet poster
 
Posts: 14
Default indirect and networkdays

The function that I am currently using is as followed in column E:

={(IF(INDIRECT("d2:d" & C2=D2),NETWORKDAYS(D2,C2)-1,NETWORKDAYS(D2-C2)+1))}

As I update my data depending on the constrait, I want the difference in the
number of days from Column C and D to be refresh according to the number of
data I have.

For example,
When I use:

=-(IF(D2=C2,NETWORKDAYS(D2,C2)-1,NETWORKDAYS(D2,C2)+1))

If I refresh my data and I now have 20 rows instead of 10, I am not able to
receive an answer unless I drag the function down to row 20.

Am I doing something incorrect in my function at the top?