Joe Lindsay
Joe Lindsay

Reputation: 21

How to differentiate between 0 and blank in excel

Is there a way that I can get a FALSE from an if statement testing if one cell is equal to the other

Example table for the test:

enter image description here

Thanks,

Joe

Upvotes: 0

Views: 1515

Answers (2)

Daniel
Daniel

Reputation: 1

Yes, excel has an ISBLANK function that returns TRUE if a cell is blank. In your case, you could write your formula like this:

=IF(AND(A2=B2, NOT(ISBLANK(B2))), "Match", "No match")

Upvotes: 0

Scott Craner
Scott Craner

Reputation: 152585

You can use EXACT, which will compare the string text and not the numbers:

=IF(EXACT(A2,B2),"Match","No Match")

enter image description here

Upvotes: 1

Related Questions