title: Use IF with multiple ELSEIF and ELSE in a spreadsheet cell
body: <p>I am trying to make this statement applicable to some cells in my google spreadsheet :</p>
  
  <pre><code>if ((B29 - B36) &gt; 0) {
      (B29 - B36) * (D36 / 100) + F35 + F34 + F33
  } else if  ((B29 - B35) &gt; 0) {
      (B29 - B35) * (D35 / 100) + F34 + F33);
  } else if (B29 - B34 &gt; 0) {
      (B29 - B34) * (D34 / 100) + F33);
  } else {
      0
  }
  </code></pre>
  
  <p>I tried to make it with only <code>IF</code>, but the cells didn't like the syntax :</p>
  
  <pre><code>=IF((B29 - B36) &gt; 0);((B29 - B36) * (D36 / 100) + F35 + F34 + F33);IF((B29 - B35) &gt; 0);((B29 - B35) * (D35 / 100) + F34 + F33);IF((B29 - B34) &gt; 0);((B29 - B34) * (D34 / 100) + F33);0
  </code></pre>
  
  <p>How can I achieve this?</p>