SOLVED

IF statement with OR and NETWORKDAYS

%3CLINGO-SUB%20id%3D%22lingo-sub-1846015%22%20slang%3D%22en-US%22%3EIF%20statement%20with%20OR%20and%20NETWORKDAYS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1846015%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20I%20have%20some%20trouble%20adding%20the%20OR%20function%20to%20this%20statement%3A%3C%2FP%3E%0A%3CP%3E%3DIF(AD3%3D%22%22%2C%22%22%2CNETWORKDAYS(AC3%2CAD3))%3C%2FP%3E%0A%3CP%3ESo%20far%20I%20am%20saying%20that%20if%20AD3%20is%20blank%20then%20the%20result%20should%20be%20blank%20otherwise%20the%20result%20should%20be%20the%20number%20of%20business%20days%20between%20AC3%20and%20AD3.%3C%2FP%3E%0A%3CP%3ENow%20I%20also%20need%20the%20result%20to%20be%20blank%20if%20AF3%3D%22Yes%22%20so%20I%20tried%26nbsp%3B%3DIF(OR(AD3%3D%22%22%2CAF3%3D%22Yes%22%2C%22%22)%2CNETWORKDAYS(AC3%2CAD3))%20but%20I%20get%20%23VALUE!%3C%2FP%3E%0A%3CP%3EThe%20correct%20results%20should%20be%3A%3C%2FP%3E%0A%3CP%3EIf%20AD3%20is%20blank%20and%20AF3%20is%20%22Yes%22%20The%20result%20should%20be%20blank%3C%2FP%3E%0A%3CP%3EIf%20AD3%20is%20blank%20and%20AF3%20is%20%22No%22%20The%20result%20should%20be%20blank%3C%2FP%3E%0A%3CP%3EIf%20AD3%20is%20NOT%20blank%20and%20AF3%20is%20%22Yes%22%20The%20result%20should%20be%20blank%3C%2FP%3E%0A%3CP%3EIf%20AD3%20is%20NOT%20blank%20and%20AF3%20is%20%22No%22%20The%20result%20should%20count%20business%20days%20between%20AC3%20and%20AD3%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20am%20I%20doing%20wrong%3F%20I%20have%20attached%20a%20screenshot%20of%20the%20spreadsheet%20for%20more%20help.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorNikoss_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1846015%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analysis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1846110%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20statement%20with%20OR%20and%20NETWORKDAYS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1846110%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F854944%22%20target%3D%22_blank%22%3E%40Nikoss%3C%2FA%3E%26nbsp%3BI%20believe%20you%20have%20bracket%20in%20the%20wrong%20place.%20Try%20it%20this%20way.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIF(OR(AD3%3D%22%22%2CAF3%3D%22Yes%22)%2C%22%22%2CNETWORKDAYS(AC3%2CAD3))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1846111%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20statement%20with%20OR%20and%20NETWORKDAYS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1846111%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F854944%22%20target%3D%22_blank%22%3E%40Nikoss%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUse%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIF(OR(AD3%3D%22%22%2CAF3%3D%22Yes%22)%2C%22%22%2CNETWORKDAYS(AC3%2CAD3))%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional 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
Highlighted

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

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

 

Highlighted
Best Response confirmed by Nikoss (Occasional Contributor)
Solution

@Nikoss 

Use

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