Ok here goes bare with me.
Sheet1 = 1st report is seperated nicly from a:m and 1:3000 (containing text, numbers, symbols in various forms such as abreviations, email addresss, ip address, phone numbers and residental address).
Sheet2 = (A:K) (1:1000) Restricted names, ip addresses, address (same as above)
Sheet3= Results wanted here.
So What I'm tyring to do is use the list in sheet2 to search through sheet1 and if any match then place the results in sheet3 (whole row copy and paste). I have found a Macro to help me with this but not to the extremes that I need.
My problem is this macro only goes as far as part words in a cell so example being:
"john abbot" search for john and its found
"johnabbot" search for john and its not found.
I hope I have explained it well enough. Code I using is below (and thanks in advance for any help).
Sub Comparefindpaste()
Dim srchLen, gName, nxtRw As Integer
Dim g As Range
'Clear Sheet 2 and Copy Column Headings
Sheets(2).Cells.ClearContents
Sheets(1).Rows(1).Copy Destination:=Sheets(2).Rows(1)
'Determine length of Search Column from Sheet3
srchLen = Sheets(3).Range("A" & Rows.Count).End(xlUp).Row
'Loop through list in Sheet3, Column A:I. As each value is
'found in Sheet1, Column A:M, copy it top the next row in Sheet2
With Sheets(1).Columns("A:M")
For gName = 2 To srchLen
Set g = .Find(Sheets(3).Range("A" & gName), lookat:=xlPart)
If Not g Is Nothing Then
nxtRw = Sheets(2).Range("A" & Rows.Count).End(xlUp).Row + 1
g.EntireRow.Copy Destination:=Sheets(2).Range("A" & nxtRw)
End If
Next
End With
End Sub
Bookmarks