View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Satish Satish is offline
external usenet poster
 
Posts: 37
Default compare contents between sheets and identify matching values

On Nov 3, 5:02 pm, nanda wrote:
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