Here is the sample code i had copied and tried adjusting to my requirements.pls tell me what more to be added.
Private Sub comparcells()
Dim fRow As Long
Dim rng1 As Range
Dim rng2 As Range
Dim cel As Range
Dim fOne As String
Dim fTwo As String
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Set ws1 = Sheets("Src")
Set ws2 = Sheets("mast")
Worksheets.Add
ActiveSheet.Name = "copies"
With ws1
Set rng1 = Range(.Cells(1, 1), .Cells(65536, 1).End(xlUp))
End With
With ws2
'row 1 to last row of data Sheet src:ColA
Set rng2 = Range(.Cells(1, 1), .Cells(65536, 1).End(xlUp))
For Each cel In rng1
fOne = cel
fTwo = cel
On Error Resume Next
'Find Sheet src:ColA in Sheet 2
fRow = .Cells.Find(What:=fOne, After:=Range("A1"), LookIn:=xlFormulas, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).row
If fOne = fTwo Then
ActiveCell.EntireRow.Copy("copies").Paste
End If
Next cel
End With
End Sub
Bookmarks