I need to make a macro to compare two columns looking for duplicate cells.
I'm currently using this simple double for loop algorithm
for i = 0 To ColumnASize
Cell1 = Sheet.getCellByPosition(0,i)
for j = 0 to ColumnBSi
Cell2 = Sheet.getCellByPosition(1,j)
' Comparison happens here
Next j
Next i
However, as I have 1000+ items in each column this algorithm is quite slow and inefficient. Does anyone here know/have an idea for a more efficient way to do this?