Actually, your solution worked. The only change I had to make is marked in red in the formula below. It seems that there is an extra and unnecessary comma.
Your Solution
=IF(AND(A2<>I1,D2<>I1,),"",whatever you want here?)
My full formula
=IF(AND(A2<>$I$1,D2<>$I$1),"",IF(A2=$I$1,B2,IF(D2=$I$1,C2)))