compare contents between sheets and identify matching values

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
 
S

Satish

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top