'Network days and IF statements

I am looking for a formula to count the business days (excluding public holidays) between two dates. Which I have a formula for, the issue is when the second column is blank. If it is blank, I would like it to calculate is as if the blank is today. I have googled but I have been unable to find a formula that includes the IF statement (its one or the other)

My current formula is

=((NETWORKDAYS(K2,L2,Sheet2!O3:O36)-1) 

Sheet 2 is where I have the public holidays

The above formula returns a -30000 number when L column is blank

Thank you for your help :)



Solution 1:[1]

If your current formula works fine then you can use-

=NETWORKDAYS(K2,IF(L2="",TODAY(),L2),Sheet2!O3:O36)-1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Harun24hr