SOLVED

Formula to ignore if two cells are blank

%3CLINGO-SUB%20id%3D%22lingo-sub-2697135%22%20slang%3D%22en-US%22%3EFormula%20to%20ignore%20if%20two%20cells%20are%20blank%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2697135%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22rossshah_0-1630267571993.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F306579i8AA683849061C1C8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22rossshah_0-1630267571993.png%22%20alt%3D%22rossshah_0-1630267571993.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EHello%2C%26nbsp%3B%20I%20am%20looking%20for%20a%20formula%20on%20cell%20c2%20to%20c6.%26nbsp%3B%20I%20have%20written%20if%20else%20formula%20to%20say%20Ok%20or%20Not%20Ok.%26nbsp%3B%20However%2C%20I%20want%20C5%20to%20ignore%20the%20if%20else%20formula%20because%20A5%20and%20B5%20are%20blanks.%26nbsp%3B%20%26nbsp%3BRight%20now%2C%20without%20the%20formula%2C%20it%20says%20not%20Ok.%26nbsp%3B%20%26nbsp%3BHow%20to%20write%20a%20formula%20on%20C5%3F%26nbsp%3B%20Thanks.%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2697135%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2697155%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20to%20ignore%20if%20two%20cells%20are%20blank%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2697155%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1140763%22%20target%3D%22_blank%22%3E%40rossshah%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EIn%20C2%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIF(AND(A2%3D%22%22%2CB2%3D%22%22)%2C%22%22%2CIF(AND(A2%3D%22active%22%2CB2%3D%22active%22)%2C%22ok%22%2C%22not%20ok%22))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFill%20down.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2697158%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20to%20ignore%20if%20two%20cells%20are%20blank%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2697158%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1140763%22%20target%3D%22_blank%22%3E%40rossshah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DCHOOSE(COUNTIFS(A2%3AB2%2C%22active%22)%2B1%2C%22%22%2C%22not%20ok%22%2C%22ok%22)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

rossshah_0-1630267571993.png

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)
Solution

@rossshah

In C2:

 

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

 

Fill down.

Thanks . Worked Perfectly.

@rossshah 

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