1

I want to combine these two if statements so that the cell returns "Home" if C1=E1, "Not Home" if C1<>E1, but ignores blank cells, so the cell returns blank if either C1 or E1 is blank.

=if(AND(C1=E1, C1<>"", E1<>""),"Home","")
=if(AND(C1<>E1, C1<>"", E1<>""),"Not Home","")

How can I achieve this?

halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

1

try:

=IF((C1="")+(E1="");;IF(C1=E1; "Home"; "Not Home"))
player0
  • 124,011
  • 12
  • 67
  • 124