title: How to avoid @ character in Excel VBA when pasting a formula to a cell
body: <p>When I try to make equal a cell with a formula containing a named range <code>MyRange</code>, the result will contain an unnecessary <code>@</code> character.</p>
  <p>VBA code that I try to apply:</p>
  <pre><code>Sub InsertFormula()
  
  Range(&quot;D1&quot;) = &quot;=SUM(SUMIFS(A:A,B:B,MyRange))&quot;
  
  End Sub
  </code></pre>
  <p>The result in the <code>D1</code> cell will be <code>=SUM(SUMIFS(A:A,B:B,@MyRange))</code> and the <code>@</code> character ruins all the formula that works fine by writing it by hand without the <code>@</code> in the cell.</p>
  <p>How Could I avoid character <code>@</code> in my result? Can you somebody help me in this matter?</p>