Formula to ignore if two cells are blank

Occasional Contributor


Hello,  I am looking for a formula on cell c2 to c6.  I have written if else formula to say Ok or Not Ok.  However, I want C5 to ignore the if else formula because A5 and B5 are blanks.   Right now, without the formula, it says not Ok.   How to write a formula on C5?  Thanks.    

4 Replies
best response confirmed by rossshah (Occasional Contributor)


In C2:


=IF(AND(A2="",B2=""),"",IF(AND(A2="active",B2="active"),"ok","not ok"))


Fill down.

Thanks . Worked Perfectly.


=CHOOSE(COUNTIFS(A2:B2,"active")+1,"","not ok","ok")
Thank you. Worked perfectly. I did not know about choose.