EXCEL replace "False" with "NO"

I am trying to print the word NO on the input if the condition is false. Here is what I am trying to do now

=IF (A2="a")AND(b2="b", "YES","NO")

      

This seems to work, but I keep getting this error | Formula parse error.

I am new to EXCEL and I have no idea what am I doing wrong? Any help would be great Thanks!

+3


source to share


3 answers


Use If()

and AND

like this:

=IF(AND(A2="a",b2="b"),"Yes","No")

...



Pay close attention to the closure )

in And()

, I got frustrated several times forgetting about it and wondering why my If

formula didn't work.

+4


source


You were close. try it



=IF(AND(A2="a",B2="b"),"YES","NO")

      

+6


source


Format a cell with a custom format

[=1]"YES";"NO"

      

Then convert the cell formula result to an integer.

=INT(AND(A2="a",B2="b"))

      

+2


source







All Articles