title: Excel formula escape characters
body: <p>I have a below formula which works in excel, in a cell.</p>
  
  <pre><code>="D"&amp;AC2 &amp; REPT(" ",12 - LEN(AC2))&amp;REPT(" ", 20)&amp;T2&amp;REPT(" ", 3 - LEN(T2))&amp;AD2&amp;REPT(" ", 2 - LEN(AD2))&amp;REPT(" ",12)
  </code></pre>
  
  <p>I tried to translate this to VBA, For letter <code>D</code> and all the whitespaces <code>" "</code> I used escape characters (i thought, they are escape characters) <code>"""" """"</code> but I couldn't get it to work.</p>
  
  <p>Here's the formula I tried in VBA</p>
  
  <pre><code>"= """"D""""&amp;AC2 &amp; REPT("""" """" ,12 - LEN(AC2))&amp;REPT("""" """", 20)&amp;T2&amp;REPT("""" """" , 3 - LEN(T2))&amp;AD2&amp;REPT("""" """" , 2 - LEN(AD2))&amp;REPT("""" """" ,12)"
  </code></pre>
  
  <p>Any help is appreciated. Thanks</p>