You can use the index of the Dictionary object and use its own indexing properties to perform lokups. Iβm not sure how well this will be performed in a data set of 200 thousand records, where a high failure report will occur, and you show at least 78% failure rate (200 thousand records for compliance and updating 43 thousand records )
Sub Sample3() Dim tracker As Worksheet, master As Worksheet Dim OutPut As Long Dim v As Long, p As Long, vMASTER As Variant, vTRACKER As Variant, dMASTER As Object Set tracker = Workbooks("test.xlsm").Sheets("Sheet1") Set master = Workbooks("test.xlsm").Sheets("Sheet2") Set dMASTER = CreateObject("Scripting.Dictionary") Debug.Print Timer 'Application.ScreenUpdating = False '<~~no real need to do this if working in memory With tracker vTRACKER = .Range(.Cells(5, 2), .Cells(Rows.Count, 1).End(xlUp)).Value2 End With With master vMASTER = .Range(.Cells(2, 1), .Cells(Rows.Count, 3).End(xlUp)).Value2 For v = LBound(vMASTER, 1) To UBound(vMASTER, 1) If Not dMASTER.exists(vMASTER(v, 1)) Then _ dMASTER.Add Key:=vMASTER(v, 1), Item:=vMASTER(v, 3) Next v End With For v = LBound(vTRACKER, 1) To UBound(vTRACKER, 1) If dMASTER.exists(vTRACKER(v, 1)) Then _ vTRACKER(v, 2) = dMASTER.Item(vTRACKER(v, 1)) Next v With ThisWorkbook.Sheets("Sheet1") 'tracker .Cells(5, 1).Resize(UBound(vTRACKER, 1), 2) = vTRACKER End With 'Application.ScreenUpdating = True '<~~no real need to do this if working in memory Debug.Print Timer OutPut = MsgBox("Update over!", vbOKOnly, "Update Status") dMASTER.RemoveAll: Set dMASTER = Nothing Set tracker = Nothing Set master = Nothing End Sub
As soon as both ranges are reflected in variant arrays, a dictionary is created to fully use its indexing properties for identification.
The above shows a significant increase in the efficiency of more than 200 thousand records in master compared to 43 thousand records in the tracker .
btw, for this I used .XLSB; not .XLSM.