![]()
Sub customcopy() Dim strsearch As String, lastline As Integer, tocopy As Integer Dim v As Variant, i As Long, j As Long, c As Range strsearch = InputBox("Enter WBSE's To Copy Separated by commas") v = Split(strsearch, ",") lastline = Range("A65536").End(xlUp).Row For i = 1 To lastline Set c = Range("a" & i & ":Z" & i) For j = LBound(v) To UBound(v) If Application.CountIf(c, "*" & v(j) & "*") > 0 Then Rows(i & ":" & i + 5).Copy Destination:=Sheets("Replace").Cells(Rows.Count, "a").End(xlUp)(2) Exit For End If Next j Next i End Sub
Bookmarks