title: Using a list in Excel VBA
body: <p>Using an Excel macro (VBA) I'm inserting the following formula into a worksheet.  Later in the code I paste over the formulas as values.</p>
  
  <pre><code>Firstrow = 2
  Lastrow = .Cells(.Rows.Count, "D").End(xlUp).Row
    With .Range(.Cells(Firstrow, "A"), .Cells(Lastrow, "A"))
          .Formula = "=IF(ISERROR(VLOOKUP(D2,Codes!$A$1:$A$14,1,FALSE))=TRUE,""YES"",""NO"")"
    End With
  </code></pre>
  
  <p>Is there a better way to just have the answers Yes or No entered into the cells in column A.  I would like the lookup list (Codes!$A$1:$A$14) to be inside of the macro instead of in one of the worksheets.  Thanks in advance for any help you might be able to send my way!  Jordan.</p>