IF function

  • Thread starter Thread starter FrankM
  • Start date Start date
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
 
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"))
 
Maybe something like this comparing A1 and B1:

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