IF function

F

FrankM

HELP, I have a If function comparing 2 cells of data, but want the result to
return a blank cell if one of the two cells being compared is blank.

Example Cell C1 is "L"
Cell D1 is "M"

The formula I have in would return "X" for wrong, if D1 was "L", then my
result would return "c" - but I would also like if D1 was blank with no data,
the result would also be blank
 
J

JBeaucaire

Sorry, I missed that you want a "c" if they match. That formula would be:

=IF(OR(ISBLANK(A1),ISBLANK(B1)),"",IF(A1=B1,"c","X"))
 
J

JBeaucaire

Maybe something like this comparing A1 and B1:

=IF(OR(ISBLANK(A1),ISBLANK(B1),A1=B1),"","X")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top