I need help with a nested IF function. What I am trying to do is if J9 is blank and if K9 is not blank then I want it to be 0, other wise I want the networkdays between J9 and M9 minus our list of Holidays.
My current formulas is
=IF((J9=""),0,IF(NOT(K9=""),0,NETWORKDAYS(J9,M9,Holiday))-1)
This is working where K9 is blank but if K9 has a date I am getting -1 where it should be 0.
What is this -1?
You can try use this: =IF(J9="", 0, IF(K9="", MAX(0,NETWORKDAYS(J9,M9,Holiday))-1, 0))
Last edited by zbor; 03-19-2010 at 10:20 AM.
"Relax. What is mind? No matter. What is matter? Never mind!"
The -1 has something to do with no figuring in the weekend. I found this last year and really do not remember the reason behind it but it works for what I need and I tried your formula and it seems to work. Thanks for your help.
But it won't give you -1
What do you need if you take for example same date in J9 and M9 and it's sunday?
"Relax. What is mind? No matter. What is matter? Never mind!"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks