try it like this, its actualy a nested if, not an or condition

=IF(D231="", A231 & " not in SCHOOL",IF(A231="",D231 & " not in HOME",""))