title: VBA: Use Dictionary instead vlookup function
body: <p>I'm using the vlookup function in my vba code, but it's taking too much time to run when I have more then 100k rows of data:</p>
  
  <pre><code>Sub getType()
  Application.ScreenUpdating = False
  Application.Calculation = xlManual
  On Error Resume Next
  Dim LastRow1 As Long
  Dim LastRow2 As Long
  Dim Row As Long
  Dim Clm As Long
  
  
  Set ws = Sheets("P")
  LastRow1 = ws.Cells(Rows.Count, "A").End(xlUp).Row
  Table1 = Sheet2.Range("A2:A" &amp; LastRow1)
  Set ws = Sheets("CRI")
      LastRow2 = ws.Cells(Rows.Count, "A").End(xlUp).Row
  Table2 = CRI.Range("A2:D" &amp; LastRow2)
  Row = Sheet2.Range("J2").Row
  Clm = Sheet2.Range("J2").Column
  
  For Each cl In Table1
    Sheet2.Cells(Row, Clm).Value = Application.WorksheetFunction.VLookup(cl, Table2, 4, False)
    Row = Row + 1
  Next cl
  Calculate
  </code></pre>
  
  <p>Reading some topics here I checked that it's possible to speed up by using dictionary, but I didn't understand the concepts correctly to implement the solution on my code.</p>
  
  <p>Also, there is no duplicate data on table2, but table1 contains duplicate values.</p>
  
  <p>Could anyone please help me convert vlookup to dictionary and if possible reference some videos tutorials so I can learn the concept? </p>