# Formula to combine IF functions for days between dates?

1. ## Formula to combine IF functions for days between dates?

Hi there I am at a loss and would so appreciate any help.

I have a formula calculating NETWORKDAYS between 2 dates. If the 2 dates are equal I need it to result in zero, instead it will result with a "1". I tried fixing this using a -1 at the end, but this won't work if the second date is less than the first date, where I need a result of -1, or -2, -3 etc.

Part of my formula also contains an IF formula to only look at the date cells if there is an actual date in the cell.

So I think I need to combine 2 IF formulas?

My formula currently is: =IF(AND(ISNUMBER(K135),ISNUMBER(M135)),NETWORKDAYS(K135,M135,Lookups!V32:V59)," ")

2. ## Re: Formula to combine IF functions for days between dates?

I should have also mentioned, my current formula is looking up a holiday list to exclude those days

3. ## Re: Formula to combine IF functions for days between dates?

Try it like this:

=IF(AND(ISNUMBER(K135),ISNUMBER(M135)),NETWORKDAYS(K135,M135,Lookups!V32:V59)-(K135<=M135)," ")

Hope this helps.

Pete

4. ## Re: Formula to combine IF functions for days between dates?

YES!! This works. Thank you so much!!!

There are currently 1 users browsing this thread. (0 members and 1 guests)