compare contents between sheets and identify matching values

  • Thread starter Thread starter nanda
  • Start date Start date
N

nanda

i want a macro script to compare contents in first sheet first column
with the contents in second sheet first column. please assist.

thanks,
nanda
 
i want a macro script to compare contents in first sheet first column
with the contents in second sheet first column. please assist.

thanks,
nanda


Try this...ofc there can be better options...but this shld also work

For i = 1 To 100
For j = 1 To 100
If Worksheets(1).Cells(i, 1).Value = Worksheets(2).Cells(j,
1).Value Then
'do whatever if match is found
Exit For
End If
Next j
Next i
 
Back
Top