You have a few options, try this:

=(E1="yes")*(First formula here) + (E1<>"yes")*(Second formula here)


The (E1="yes")*( ) will become 1*( ) when E1 contains "yes", when E1 does not contain "yes" (E1="yes")*( ) will become 0*( ) or just 0.


This is the boolean logic method, you could also use IF(E1="yes", first formula, second formula)