title: Excel nested if and statements
body: <p>I'm trying to create a spreadsheet with nested if and statements but I keep getting a too many arguments error (despite using an example I found online). Can anyone see where I'm going wrong? I've been googling fruitlessly for a while!</p>
  <pre><code>= IF(AND(D5&gt;=$M$3, E5&lt;=$M$4),
       F5, 
       IF(AND(D5&gt;=$M$3, D5&lt;=$M$4),
           NETWORKDAYS(D5, $M$4, ($U$5:$U$68), 
               IF(AND(E5&gt;=$M$3, E5&lt;=$M$4),
                   NETWORKDAYS($M$3, E5, ($U$5:$U$68))))
  </code></pre>