Sub test()
For j = 1 To 300
a = InputBox("请输入要筛选的订单尾号后回车:")
If a = "" Then Exit Sub
l = Len(a)
Application.ScreenUpdating = False
r = Sheet2.[C65536].End(3).Row
n = 0
For i = 2 To [C65536].End(3).Row
If Right(Cells(i, 3), l) = a Then
r = r + 1
Rows(i).Copy Sheet2.Range("A" & r)
n = n + 1
End If
Next i
'Sheet1.Activate
Range("u" & r) = n
Range("t" & r) = Now
Application.ScreenUpdating = True
MsgBox "the num of items added:" & n
MsgBox "check again:" & a
Next j
End Sub