=IF(K7<=0,0,IF(L7<0,J7,IF(AND(K7>0,L7>0),L7,J7)))

and you don't have a column N ;-)

You just need to determine the priority sequence of the checks and build the nested IF as you go.

Regards