title: VBA error Error 2023
body: <p>I don't know why I am getting this error on the debug!</p>
  <p>I have a table as follows:</p>
  <p><img src="https://i.stack.imgur.com/rl5M5.jpg" alt="table" /></p>
  <p>I am doing a simple lookup, but it doesn't seem to work even the type are matched:</p>
  <p>Here is my code</p>
  <pre><code>Sub projectLookUp2()
      Dim mainWorkBook As Workbook
      Dim ProjectListSheet As Worksheet
      Dim newSheet As Worksheet
  
      Set mainWorkBook = Workbooks(&quot;CPL ERICOLL Uploader final_20161109 (Autosaved).xlsm&quot;) 'this is the active workbook 
      Set ProjectListSheet = mainWorkBook.Worksheets(&quot;Project List&quot;)
  
      Set newSheet = mainWorkBook.Worksheets(&quot;new sheet&quot;)
  
      lrow = ProjectListSheet.Cells(Rows.Count, &quot;C&quot;).End(xlUp).row
  
      Dim projectName As String
      Dim TGPassed As Variant
  
      projectName = &quot;XL M2M Initial Setup&quot;
  
      With ProjectListSheet
          TGPassed = Application.VLookup(projectName, Range(&quot;C4:C&quot; &amp; lrow), 2, False)
  
          Debug.Print CStr(TGPassed)
      End With
      'Debug.Print ProjectListSheet.Range(&quot;D10&quot;).Value
  
  End Sub
  </code></pre>
  <p>I am just following a simple tutorial and this is how its done, I searched for some solution but none seemed to work</p>
  <p>what I get is this in the debug window :
  <code>Error 2023</code></p>