数据过滤基于特定的单词,然后将其复制到基于匹配的下一页

我有一组数据,并希望根据某个特定的词来过滤数据。 例如,苹果,然后我想复制行是根据标准过滤到另一个表没有苹果一词。

图片

Dim i As Integer Dim Percent As Variant Dim Search As String Search = InputBox("Enter your search word here") If Search = "" Then Exit Sub For i = 5 To Range("A65536").Cells.End(xlUp).Row If Cells(i, 1) = Search Then GoTo Other Next i MsgBox "Nothing matched" Exit Sub Other: For i = 1 To Range("A65536").Cells.End(xlUp).Row If Cells(i, 1) = Search Then Cells(i, 3).Select Selection.Copy Sheets("Sheet1").Cells(i, 3).Copy Destination:=Sheets("Sheet2").Range("K6") End If Next i