Sub compare()
Dim rowt1%, rowt2%, i%, k%, a%, b%, c%
Dim arr, arr1, arr2
Dim d1 As Object
Dim d2 As Object
Set d1 = CreateObject(“scripting.dictionary”)
Set d2 = CreateObject(“scripting.dictionary”)
rowt1 = Cells(1048576, 1).End(3).Row
rowt2 = Cells(1048576, 2).End(3).Row
Range(Cells(2, 1), Cells(rowt1, 1)).ClearFormats
Range(Cells(2, 2), Cells(rowt1, 2)).ClearFormats
a = 1
b = 1
c = 1
If rowt1 >= rowt2 Then
i = rowt1
Else
i = rowt2
End If
On Error Resume Next
ReDim arr(1 To i, 1 To 5)
arr = Range(Cells(2, 1), Cells(i, 5))
arr1 = Range(Cells(2, 1), Cells(rowt1, 1))
arr2 = Range(Cells(2, 2), Cells(rowt2, 2))
For k = 1 To UBound(arr1)
d1.Add Trim(arr1(k, 1)), “”
Next k
For k = 1 To UBound(arr2)
d2