title: Expected End of Statement in formula with quotes
body: <pre><code>Sub FillNames()
  
  Range("D2:D56").SpecialCells(xlCellTypeBlanks).Formula = _
      "=IF(AND(C&gt;800,C&lt;900),  "YES", "NO")"
  
  End Sub
  </code></pre>
  
  <p>I get the compile error expected: end of statement. It seems to have issue with the quotes around the words YES and NO. </p>
  
  <p>If I remove the quotes around YES and NO and run the macro, it will run and print what is in the formula quotes into the cell. I don't understand then how the quotes cause a syntax error. </p>
  
  <p>I am running Excel 2011 for Mac, don't know if that has anything to do with it.</p>