title: Inserting a formula containing an ampersand into a cell
body: <p>I'm trying to create a formula in the A1 cell which contains an ampersand character that looks something like this in Excel:</p>
  
  <pre><code>="Hello, "&amp;A2
  </code></pre>
  
  <p>My VBA code is as follows:</p>
  
  <pre><code>Worksheets("Sheet1").Range("A1").Formula = "=""Hello, "" &amp; "&amp;A2"
  </code></pre>
  
  <p>VBA is throwing errors, and I can't figure out why. I've tried using double ampersands, and double quotes in various places and can't get around this error.</p>