title: Excel 2010 VBA - Copy a formula (with Text) to the last row
body: <p>I am seeking for an advise. Thanks a lot for any help you may priovide for this issue.</p>
  
  <p>Here is the code I have found. It works well but the formula I need to copy contents "Text" and the routine doesn't want to work. Any idea about what should I do?</p>
  
  <pre><code>Sub Test()
      Dim lastRow As Long
  
      With Sheets("Sheet1")
          lastRow = .Cells(.Rows.Count, "C").End(xlUp).Row
          .Range("y2:y" &amp; lastRow).Formula = "=IFERROR(VLOOKUP(K2,Vlook!$C$2:$D$17,2,FALSE),"FOREIGN")"  ' Not Working - The "Text" becomes red in the VBA Editor
  
        '  .Range("z2:z" &amp; lastRow).Formula = " =VLOOKUP(C2,$U$2:$V$10,2,0)"  'Works well with this formula
  
      End With
  
  End Sub
  </code></pre>