indirect and networkdays

G

Guest

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?
 
D

daddylonglegs

I'm not sure what you're trying to do here. Why can't you just copy the
formula down to the maximum number of rows you may need?

If you just want to keep E2 blank if there are no dates in C2 and D2
perhaps

=IF(D2*C2,-IF(D2>=C2,NETWORKDAYS(D2,C2)-1,NETWORKDAYS(D2,C2)+1),"")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top