Maybe:
Sub j_farr3llyy()
Dim strsearch As String, lastline As Long, tocopy As Integer
strsearch = CStr(InputBox("enter the string to search for"))
lastline = Range("A65536").End(xlUp).Row
J = 1
For i = 1 To lastline
For Each c In Range("o" & i & ":HN" & i)
If InStr(c.Text, strsearch) Then
tocopy = 1
End If
Next c
If tocopy = 1 Then
Rows(i).Copy Destination:=Sheets(4).Rows(J)
J = J + 1
GoTo zz
End If
zz:
tocopy = 0
Next i
End Sub
Or?
Sub j_farr3ll()
Dim i As Long
Dim x As Long
Dim c As Range
Dim lastline As Long
lastline = Range("A65536").End(xlUp).Row
For i = 1 To lastline
For x = 3 To 7
For Each c In Range("o" & i & ":HN" & i)
If c.Value Like "*" & x & "*" Then
Rows(i).Copy Sheets("Sheet4").Range("A" & Rows.count).End(3)(2)
GoTo zz
End If
Next c
Next x
zz:
Next i
End Sub
Bookmarks