I want to loop through Column A and check if any of the values exist in Column B. I am currently using the .Find function however when I started dealing with large sets of rows (>60 000), it started taking a long time to run the code.
I thought I could create 2 in memory record sets of each column and compare them using .FindFirst but I cannot make it work. I think it is because I am not using any "ADO/DAO" connections since my data are in the workbook itself.
Is there a way to quickly find a match in Column B for each of the values of Column A?
I have tried changing the code to .FindFirst and using recordsets but it keeps saying "The Object does not support property etc...".
For Each cel In rngRD.Cells
With ThisWorkbook.Sheets("RawData").Range("A1:A" & Last_Row_DB)
.Cells(1, 1).Activate
Set CRef = .Find(What:=cel, _
After:=ActiveCell, _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)
'If cannot be found then
If CRef Is Nothing Then
'Do Something
Else
Set CRef = .FindNext(CRef)
End If
End With
Next cel