SOLVED

# IF statement with OR and NETWORKDAYS

Copper Contributor

# IF statement with OR and NETWORKDAYS

Hello I have some trouble adding the OR function to this statement:

So far I am saying that if AD3 is blank then the result should be blank otherwise the result should be the number of business days between AC3 and AD3.

Now I also need the result to be blank if AF3="Yes" so I tried =IF(OR(AD3="",AF3="Yes",""),NETWORKDAYS(AC3,AD3)) but I get #VALUE!

The correct results should be:

If AD3 is blank and AF3 is "Yes" The result should be blank

If AD3 is blank and AF3 is "No" The result should be blank

If AD3 is NOT blank and AF3 is "Yes" The result should be blank

If AD3 is NOT blank and AF3 is "No" The result should count business days between AC3 and AD3

What am I doing wrong? I have attached a screenshot of the spreadsheet for more help.

4 Replies

# Re: IF statement with OR and NETWORKDAYS

@Nikoss I believe you have bracket in the wrong place. Try it this way.

``=IF(OR(AD3="",AF3="Yes"),"",NETWORKDAYS(AC3,AD3))``

best response confirmed by Nikoss (Copper Contributor)
Solution

# Re: IF statement with OR and NETWORKDAYS

Use

``=IF(OR(AD3="",AF3="Yes"),"",NETWORKDAYS(AC3,AD3))``

# Re: IF statement with OR and NETWORKDAYS

Thank you so much it works now!

# Re: IF statement with OR and NETWORKDAYS

Thanks a lot! That works!
1 best response

Accepted Solutions
best response confirmed by Nikoss (Copper Contributor)
Solution

# Re: IF statement with OR and NETWORKDAYS

Use

``=IF(OR(AD3="",AF3="Yes"),"",NETWORKDAYS(AC3,AD3))``