当前位置: 动力学知识库 > 问答 > 编程问答 >

Nested IF(OR(AND excel function

问题描述:

It took me a long time to get this function to work, now I need it to return a blank in the column I am putting my formula in if B, D, OR E, cells are blank. Thank you for your attention in this matter. For refrence this will be going in column "F".

=IF(OR(AND(B2="SPC",D2="BLC",E2="SSD 1"),(AND(B2="SGT",D2="ALC",E2="SSD 2")),(AND(B2="SSG",D2="SLC",E2="SSD 3")),(AND(B2="SFC",D2="SLC",E2="SSD 4"))),"Yes","No")

网友答案:

because the comments always add hidden characters to long formulas:

=IF(LEN(B2)*LEN(D2)*LEN(E2),IF(SUMPRODUCT((B2={"SPC","SGT","SSG","SFC"})*(D2={"BLC","ALC","SLC","SLC"})*(E2="SSD "&{1,2,3,4})),"Yes","No"),"")

would be my choice... while all you need is to wrap your formula up in something like:

=IF(OR(B2="",D2="",E2=""),"",[your formula])
分享给朋友:
您可能感兴趣的文章:
随机阅读: