SOLVED

IF statement with OR and NETWORKDAYS

Copper Contributor

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

=IF(AD3="","",NETWORKDAYS(AC3,AD3))

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

@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

@Nikoss 

Use

=IF(OR(AD3="",AF3="Yes"),"",NETWORKDAYS(AC3,AD3))
Thank you so much it works now!
Thanks a lot! That works!
1 best response

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

@Nikoss 

Use

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

View solution in original post