Formula to ignore blanks

%3CLINGO-SUB%20id%3D%22lingo-sub-3013750%22%20slang%3D%22en-US%22%3EFormula%20to%20ignore%20blanks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3013750%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20There%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20do%20a%20formula%20of%20%3DA1%3DB1%20but%20to%20ignore%20blank%20cells%20how%20do%20I%20do%20this%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20border%3D%220%22%20width%3D%22192%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2264%22%20height%3D%2219%22%3ECode%201%3C%2FTD%3E%3CTD%20width%3D%2264%22%3ECode%202%3C%2FTD%3E%3CTD%20width%3D%2264%22%3EMatch%3F%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2219%22%3E833%3C%2FTD%3E%3CTD%3E834%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2219%22%3E833%3C%2FTD%3E%3CTD%3E833%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2219%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2219%22%3E833%3C%2FTD%3E%3CTD%3E837%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20would%20like%20the%20formula%20in%20column%20C.%20I%20would%20like%20it%20to%20come%20back%20with%20%22Yes%22%20if%20the%20two%20columns%20match%20and%20%22No%22%20if%20they%20do%20not%20match.%20But%20my%20normal%20formula%20of%20%3DA1%3DB2%20is%20counting%20the%20blank%20row%20as%20%22Yes%22%20because%20technically%20they%20are%20the%20same.%20How%20do%20I%20get%20it%20to%20ignore%20these%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3013750%22%20slang%3D%22en-US%22%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-3013816%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20to%20ignore%20blanks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3013816%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1232266%22%20target%3D%22_blank%22%3E%40PrettyDreamer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(AND(A2%3DB2%2CA2%26lt%3B%26gt%3B%22%22%2CB2%26lt%3B%26gt%3B%22%22)%2C%22Yes%22%2C%22No%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20enter%20above%20formula%20in%20cell%20C2%20and%20copy%20down.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi There,

 

I am trying to do a formula of =A1=B1 but to ignore blank cells how do I do this? 

 

Code 1Code 2Match?
833834 
833833 
   
833837 

 

So I would like the formula in column C. I would like it to come back with "Yes" if the two columns match and "No" if they do not match. But my normal formula of =A1=B2 is counting the blank row as "Yes" because technically they are the same. How do I get it to ignore these? 

2 Replies

@PrettyDreamer 

=IF(AND(A2=B2,A2<>"",B2<>""),"Yes","No")

 

I would enter above formula in cell C2 and copy down.

You are my saviour - thank you!