title: IF AND OR SWITCH in Google Sheets
body: <p>I have made a basic formula which calculates the number of staff required to process sales in any given hour on a typical working day.</p>
  
  <p>Now I am trying to create a formula in Google sheets which checks the number of staff required to process the sales VS the actual number of staff who have been rostered on.</p>
  
  <p>I have one row with the predicted hourly sales, one row with the number of staff required to process the sales, and one row with the actual number of staff rostered for every given hour.</p>
  
  <p>I need to create a formula which checks the number of staff required vs the number of staff actually rostered:</p>
  
  <ul>
  <li>IF there is insufficient staff, it will return "Insufficient".</li>
  <li>IF the number of staff rostered is sufficient (within 10% less of, or 25% more of the predicted sales), return "Sufficient".</li>
  <li>IF there is more than 25% more staff than necessary, return "Overstaffed".</li>
  </ul>
  
  <p>I've searched this, but I am unable to find a suitable example / wrap my head around them and customize them to suit my needs.</p>
  
  <p>I've got reasonable experience programming with PHP, Python, Java, and JavaScript, however, in this instance, I am strictly limited (by my employer) to creating a roster in Google sheets.</p>
  
  <p><strong>I have tried the following:</strong></p>
  
  <pre><code>=IF(F13 = "", "", IF(F15 = "", "", IF(F15 &lt; F13, "Understaffed", IF(F15 &gt;= F13, "Enough Staff", ELSEIF(F15 &gt; (F13*1.3), "Too many staff")))))
  </code></pre>
  
  <p><strong>And I have also tried:</strong></p>
  
  <pre><code>=SWITCH(G15, G15 &lt; G13, "Under", G15 &gt;= G13, "Fine", G15 &gt; G13*1.3, "Over")
  </code></pre>
  
  <p>But they do not work correctly.</p>
  
  <p>Can someone assist me in this? TIA</p>
  
  <p><img src="https://i.stack.imgur.com/yZuMj.png" alt="see img"></p>