How about:
Formula: copy to clipboard
=IF(OR(SIGN(U5)<>SIGN(AA5),ABS(AA5)>ABS(U5)),"ERROR",IF(U5<0,"LOAN","DEPOSIT"))