It looks like you need an IF/ISNA string. I'm not entirely sure how the string would look but I believe it would start out with something similar to..
Formula: copy to clipboard
=IF(ISNA(E='Sheet2'!F:F)....etc etc..

Hopefully that puts you on the right path for researching a solution.

Kind Regards,

Tommy Bailey