title: Change formula based on cell value excel
body: <p>I am trying to change the formula of cell B based on the value of cell A.
  If the value in A is 2, i want the formula to be e^(-b*x) and otherwise it should be x^2.</p>
  
  <p>I tried it with an IF-statement: </p>
  
  <pre><code>=IF(G2=2; [D2*EXP(-(L2*E2))];[E2*E2])
  </code></pre>
  
  <p>But it does not work. Also, examples only use IF-statements to display text.
  So i am wondering if what i would like to do is even possible.</p>