title: VBA - Run-time error '13' when trying to transpose rows value
body: <p>I am trying to compare two columns in different worksheets to check if value in column A exist in column B.</p>
  
  <p>When I am trying to transpose row value and store it into dictionary for comparison, run-time error '13' is triggered.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>Sub Compare()
  
  Dim rngA As Range, rngB As Range
  Dim dict As Object, rw As Range
  Dim a As Application, tmp As String
  Dim Row1Last As Long
  Dim Row2Last As Long
  
  Set a = Application
  Set dict = CreateObject("scripting.dictionary")
  Set sht1 = Worksheets("list_Facility_BOS")
  Set sht2 = Worksheets("List_Facility_PG")
  
  
  With Sheets("list_Facility_BOS")
  Row1Last = .Cells(Rows.Count, "G").End(xlUp).Row
  End With
  
  With Sheets("List_Facility_PG")
  Row2Last = .Cells(Rows.Count, "H").End(xlUp).Row
  End With
  
  Set rngA = sht1.Range("G2:G" &amp; Row1Last)
  Set rngB = sht2.Range("H2:H" &amp; Row2Last)
  
  For Each rw In rngA.Rows
      dict.Add Join(a.Transpose(a.Transpose(rw.Value)), Chr(0)), rw.Row
  Next rw
  
  For Each rw In rngB.Rows
      tmp = Join(a.Transpose(a.Transpose(rw.Value)), Chr(0))
      If dict.exists(tmp) Then
      Else
          rw.Cells(1).Interior.ColorIndex = 3
      End If
  Next rw
  
  End Sub
  </code></pre>
  
  <p>I attempt to compare a 20k rows record column against another 20k rows column in another worksheet. Error '13' was trigger in this line of code:</p>
  
  <pre><code>dict.Add Join(a.Transpose(a.Transpose(rw.Value)), Chr(0)), rw.Row
  </code></pre>
  
  <p>I am new to excel VBA programming, sorry if I could'nt explain it clearly. Please let me know if there is any mistakes in my code.</p>