Alternative code
This code is flexible in a sense right now it copies 12 columns, but can easily adjust it.
Sub x()
Dim rFind As Range, sFind, sAddr As String, ws As Worksheet, rng As Range, ms As Worksheet
Application.ScreenUpdating = 0
Set ms = Worksheets("Search")
ms.Range("A7:Z" & Rows.Count).ClearContents
sFind = ms.Range("B2")
Set ws = Sheets("Data")
With ws.Columns(2)
Set rFind = .Find(sFind, .Cells(.Cells.Count), xlValues, xlPart)
If Not rFind Is Nothing Then
sAddr = rFind.Address
Do
rFind.Offset(, -1).Resize(, 12).Copy ms.Range("A" & Rows.Count).End(xlUp).Offset(1)
Set rFind = .FindNext(rFind)
Loop While rFind.Address <> sAddr
sAddr = ""
End If
End With
Set ms = Nothing
Set ws = Nothing
Set rng = Nothing
Set rFind = Nothing
Application.ScreenUpdating = True
End Sub
Bookmarks